【发布时间】:2021-11-22 01:27:37
【问题描述】:
我为我的应用程序 react 创建了一个 react 选择组件,我有 70 多个选项,为此我想定义用户可以选择的最大选项来处理它。你能帮帮我吗?
代码:
export default function ReactSelect(props) {
const animatedComponents = makeAnimated();
return (
<Select
isMulti="true" // allow to select mutli options
isRtl="true" // right to left
name="name" // html name
options={accountsNames} // options
className="basic-multi-select"
classNamePrefix="select"
isSearchable="true" // searchable for the closest one
placeholder="اختر اسم الحساب..." // if there is no option selected
components={animatedComponents}
/>
);
}
【问题讨论】:
-
看到多个答案here 也可能对您有所帮助。
标签: reactjs react-select