Flip arrow on open and close #5148
Replies: 3 comments 1 reply
-
Hi @hichemfantar, you can do same using custom components. Select:
Custom component:
|
Beta Was this translation helpful? Give feedback.
-
@hichemfantar Isn't the open menu indication enough that the menu is in fact open? Besides this is a matter of design, not functionality, and can be easily implemented using either a custom component (as @manjushsh suggested) or setting a custom style for the <Select
styles={{
dropdownIndicator: (provided, { selectProps }) => ({
...provided,
transform: `rotate(${selectProps.menuIsOpen ? 180 : 0}deg)`
})
}}
/> |
Beta Was this translation helpful? Give feedback.
-
I realize it's easy to add this feature using styling but I thought it would be nice if it was a built-in prop. |
Beta Was this translation helpful? Give feedback.
-
The arrow should should be flipped upside down to indicate that the menu is open and that clicking again will close the menu.
This is simply a proposal, other opinions are welcome.
A simple prop like
InvertArrowOnOpen
would be nice.Final result:
Beta Was this translation helpful? Give feedback.
All reactions