[MudSelect] Control popover width#10215
Conversation
- Use user supplied RelativeWidth instead of hard coded value - set min or max width depending on RelativeWidth
|
cc @versile2 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #10215 +/- ##
==========================================
+ Coverage 91.22% 91.24% +0.02%
==========================================
Files 411 412 +1
Lines 12506 12536 +30
Branches 2439 2446 +7
==========================================
+ Hits 11408 11438 +30
Misses 555 555
Partials 543 543 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Wouldn't false be a better default? (I'd say current behavior is a bug) |
|
Sure, just figured I'd leave the current behaviour as is. But yes, I could change that |
|
ahh we were just discussing this, FullWidth (which defaults to False) is used on MudMenu to do this and defaults to false. I would suggest matching this behavior especially if the default is going to be false anyways. Also AutoComplete is affected by the same limitation/bug. |
|
Just saw the conversation on #10204. Based on that, should I use |
|
I would say so and match the behavior to mudautocomplete, fullwidth is inherited from mudinputbase for those two so no need to even add a property. |
|
Yeah, already done |
danielchalmers
left a comment
There was a problem hiding this comment.
Looks great. Do you think we should have a horizontal scrollbar if the full width isn't wide enough to fit the widest items? Separate PR maybe
|
I thought about that and I don't. I can't think of a valid use case where the page shouldn't grow right of content exceeds |
ScarletKuro
left a comment
There was a problem hiding this comment.
LGTM, feel free to merge @henon / @danielchalmers
|
|
Good work! |
|
regression #10235 |
Co-authored-by: Artyom M <artem.melnikov@live.com>



Description
MudSelecthardcoded theRelativeWidthof theMudPopoverto true. This ensures that the popover width matches the select field width. However, when items available for selection are longer than the width of the select field, they are cut off. This may not always be desirable.This change
FullWidthparameter fromMudBaseInputMudPopovercomponentfalsewhich is the opposite of the current behavior (current behavior is considered a bug)mudPopover.jsto set either min or max width based on the value ofRelativeWidthWhile a non
jsfix would be preferred, the currentjsis what enforces themax-widthrestriction and without settingmin-width, the popover may render smaller than the select field, instead of matching its size, whenRelativeWidthisfalseand the item list options are short in length.Resolves #10195 , #825
How Has This Been Tested?
Visually - unit test viewer
Added a unit test to confirm applied popover classes
Type of Changes
Checklist
dev).