如何在 react-select 上更改下拉指示器位置

How to change Dropdown Indicator position on react-select

是否可以在 React Select 组件上将下拉指示器更改为“浮动”在左侧(而不是默认的右侧)?

我正在检查其 API 上的下拉指示器 props,但目前没有任何线索..

由于容器正在使用 flex

,因此您可以通过反转行顺序将下拉指示器向左移动
const customStyles = {
  control: (base) => ({
    ...base,
    flexDirection: "row-reverse"
  })
};
<Select
  styles={customStyles}
  options={options}
/>

现场演示