selectedOptionStyle with isMulti
ken-muturi opened this issue · comments
Description
selectedOptionStyle="check" does not work with multi select option see below
chakra-react-select Version
4.1.4
Link to Reproduction
TypeScript?
- Yes I use TypeScript
Steps to reproduce
- Go to '...'
- Click on '...'
- Scroll down to '...'
- See error
Operating System
- macOS
- Windows
- Linux
- iOS/iPadOS
- Android
Additional Information
No response
If you check the docs on selectedOptionStyle
it mentions this:
selectedOptionStyle
— Options:color
|check
— Default:color
As of
v1.3.0
you can pass the propselectedOptionStyle
with either"color"
or"check"
. The default option"color"
will style a selected option similar to how react-select does it, by highlighting the selected option in the color blue. Alternatively, if you pass"check"
for the value, the selected option will be styled like the Chakra UI Menu component and include a check icon next to the selected option(s). IfisMulti
andselectedOptionStyle="check"
are passed, space will only be added for the check marks ifhideSelectedOptions={false}
is also passed.
So you really just need to pass hideSelectedOptions={false}
in order to make it work, because the default is true
when isMulti
is passed.