Skip to content

feat(mat-select): add smart panel width based on trigger and largest option size #29569

Open
@Harpush

Description

@Harpush

Feature Description

Currently panelWidth can be one of three:

  1. Trigger width
  2. Largest option width
  3. Custom provided width in numbers

What I am missing is - minimum width as trigger width and grow until max option size (if needed)

Use Case

When having dynamic options texts sometimes they might be larger than trigger width and I want the largest option behavior.
Sometimes they are smaller than trigger width and I want the trigger width behavior to avoid really small select panels.
Which means I actually need: min panel width = trigger width with potential grow (not shrink!) to the largest option width.

Can be with a new panelWidth option or even minPanelWidth input (can have a complimenting maxPanelWidth too for completeness)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/selectfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions