primitives icon indicating copy to clipboard operation
primitives copied to clipboard

There's no "modal" prop in the Select component

Open MESSELMIyahya opened this issue 1 year ago • 6 comments

I couldn't make the Select component "non-modal"

MESSELMIyahya avatar Jun 27 '24 20:06 MESSELMIyahya

Seconding this. Came across this issue upon noticing the scrollbar shift: https://github.com/radix-ui/primitives/discussions/1586

patriciatiffany avatar Jul 02 '24 19:07 patriciatiffany

Any solutions? When I click select, the elements inside my sticky header navbar shift because the scrollbar disappears.

LeonLiu2020 avatar Jul 25 '24 04:07 LeonLiu2020

@LeonLiu2020 Could you provide a screenshot

MESSELMIyahya avatar Jul 25 '24 09:07 MESSELMIyahya

+1. This seems like the same issue (with the same solution) as for DropdownMenu. The inability to set modal=false for Select means that scroll bars always disappear when a Select is active. This might make sense in some contexts, but it can be jarring in others. It would be great to have the option to disable this behavior.

jhawson avatar Aug 20 '24 21:08 jhawson

+1. This seems like the same issue (with the same solution) as for DropdownMenu. The inability to set modal=false for Select means that scroll bars always disappear when a Select is active. This might make sense in some contexts, but it can be jarring in others. It would be great to have the option to disable this behavior.

DropdownMenu has a Modal prop, so this issue doesn't occur. However, the problem with Select is really annoying. Even in the official example on the Radix UI website (https://www.radix-ui.com/primitives/docs/components/select), the disappearance of the scrollbar causes all elements to shift, which is really strange. I don't understand why it was designed this way. The solutions mentioned in other issues aren't perfect either; the problem still persists.

LeonLiu2020 avatar Aug 22 '24 09:08 LeonLiu2020

@LeonLiu2020 @jhawson @patriciatiffany Ariakit is the best alternative for Radix now try it.

MESSELMIyahya avatar Aug 22 '24 10:08 MESSELMIyahya