Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

can't change material-dropdown-select [max-width], it's hard-coded #465

Open
5 tasks done
DartViet opened this issue Aug 12, 2020 · 1 comment
Open
5 tasks done

Comments

@DartViet
Copy link

Here is the code I wrote: [copied from Angular Material Drop Down Sample]

        <material-dropdown-select>
            <material-select-dropdown-item *ngFor...>
             ... my code here
           </material-select-dropdown-item>
        </material-dropdown-select>

There is a max-width hard-code: max-height: 400px; max-width: 448px, and I can't change it.

Is there a work around ?

weirdChange

  • Dart SDK Version (2.9.0)
  • AngularDart Version (^6.0.0-alpha+1)
  • Using Windows
  • Chrome
  • Using Material Design, editor: VS Code
@DartViet DartViet changed the title can't change dropdown-select material max-width can't change material-dropdown-select [max-width], it's hard-coded Aug 12, 2020
@leonsenft leonsenft transferred this issue from angulardart/angular Aug 12, 2020
@lejard-h
Copy link
Contributor

Indeed it seems to be hardcoded if no PopupSizeProvider is available
https://github.com/dart-lang/angular_components/blob/master/angular_components/lib/material_select/material_dropdown_select.dart#L514

You should be able to provide your own PopupSizeProvider.getMaxWidth implementation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants