angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.
https://pub.dev/packages/angular_components
374 stars 123 forks source link

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

Open DartViet opened 3 years ago

DartViet commented 3 years ago

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

lejard-h commented 3 years ago

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