components
components copied to clipboard
feat(mat-select): add smart panel width based on trigger and largest option size
trafficstars
Feature Description
Currently panelWidth can be one of three:
- Trigger width
- Largest option width
- 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)