swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
660 stars 47 forks source link

Select border/label overlap with empty MenuItem value #272

Open lukexor opened 8 months ago

lukexor commented 8 months ago

https://stackblitz.com/edit/hmmgyv?file=src%2FApp.tsx

image

Expected to have a white border around the label similar to when an item is selected with a non-empty value.

image

Digging in it seems like there's a max-width property on the legend component that is normally 100% but switches to 0.01px when the value property is empty.

aseerkt commented 7 months ago

You can fix this by passing notched prop as true to Select component. @lukexor

Strange we need to pass label in two places here. One as prop to Select and one as child to InputLabel Somehow passing shrink as true to InputLabel should set notched to true on Select component