thisbeyond / solid-select

The Select component for Solid.
https://solid-select.com
MIT License
172 stars 18 forks source link

Open select list is covered up by other elements #62

Closed robodna closed 2 months ago

robodna commented 2 months ago

I have a solid select element positioned near the bottom of a form. When I click to open, the select list is covered over by a bottom toolbar ( z-index 20 ). I"m unable to raise ( z-index 21) the options select list over the toolbar since the select box itself needs to be behind the bottom toolbar ( z-index 20 ), but the select box's options list needs to be shown ABOVE the bottom toolbar.

Any ideas on how to get around this issue?

Thanks,

robodna commented 2 months ago

UPDATE: This was solved by setting the select's z-index to auto.

martinpengellyphillips commented 2 months ago

Cool. Do you mean you set the z-index on the the select list only or the whole select container?

Note to self; added an issue to track more durable solution long term.

robodna commented 2 months ago

I set the z-index on <Select class="z-auto" and then created a custom stylesheet with z-index:21 for .solid-select-list

I think a portal would be the right choice since that is what native elements like the select list seem to do, but not sure.