angular_components icon indicating copy to clipboard operation
angular_components copied to clipboard

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

Open DartViet opened this issue 5 years ago • 1 comments

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

  • [x] Dart SDK Version (2.9.0)
  • [x] AngularDart Version (^6.0.0-alpha+1)
  • [x] Using Windows
  • [x] Chrome
  • [x] Using Material Design, editor: VS Code

DartViet avatar Aug 12 '20 17:08 DartViet

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

lejard-h avatar Aug 26 '20 17:08 lejard-h