Open Dammic opened 3 years ago
What could be nice perhaps could be generally allowing to set popover props on Select, that way also some of the other props can be covered (like onBackdropPress, which could be really useful for differeniating between 'outside' click and click on the select input)
I'll share one more usecase for that: In our application, we'd like to have a select on a navigation menu. The navigation menu has 'z-index' set, and due to not being able to pass z-index to the popover (via style, for ex), the select menu is rendered under the navigation, with no way to fix that
If anyone look for a temporary solution - below is the patch for patch-package that add ability to modify props of the Popover
inside Select
component like that:
<Select
...
popoverMenuProps={{ fullWidth: false, placement: 'left end' }}
/>
🚀 Feature Proposal
Instead of setting hardcoded 'true' for fullWidth prop for popover on Select, I'd like to be able to set that myself. I'd also would like to modify the 'placement' prop, which currently is not passed at all for Select (Autocomplete has that, and they are quite similar components in terms of usage)
Motivation
Adding those options would allow more customizability potential for the Select. I have a special case of select that I'd like to have menu wider than the select input triggering it. In the current form, the menu is cut to the width of that select component, which is not ideal, and I see no other way of modifying that.
Example