antd下拉选择框搜索配置:filterOption

 

 <Select
                  allowClear
                  mode="multiple"
                  showArrow={true}
                  showSearch={true}
                  filterOption={(inputValue, option) => option?.props?.label.includes(inputValue)}
                  placeholder="请选择用户"
                >
                  {notificationfeishuUsers.map((item) => {
                    return (
                      <Select.Option
                        key={item.id}
                        value={item.id}
                        label={item.name}
                        {...item}
                        className="OptionsBasic"
                      >
                        {item.name}
                      </Select.Option>
                    );
                  })}
                </Select>

 

posted @ 2024-05-07 18:15  SimoonJia  阅读(14)  评论(0编辑  收藏  举报