Reputation: 2222
Is it possible to change Dropdown Indicator to "float" on left (instead of right as default) on a React Select Component?
I was checking Dropdown Indicator props on its API but no clues at the moment..
Upvotes: 2
Views: 3463
Reputation: 43
There is an isRtl
prop for this:
<Select<OptionType>
isRtl
options={options: OptionType[]}
/>
you can find it on their prop documentation
Upvotes: 1
Reputation: 81723
You can move the dropdown indicator to the left by reversing the row order since the container is using flex
const customStyles = {
control: (base) => ({
...base,
flexDirection: "row-reverse"
})
};
<Select
styles={customStyles}
options={options}
/>
Upvotes: 6