前端项目实战241-ant design下拉框具有搜索功能

<Select
                            showSearch
                            onChange={onChangeManufacture}
                            style={{ width: '200px' }}
                            placeholder="请选择生产单号"
                            optionFilterProp="children"
                            filterOption={(input, option) => (option?.label ?? '').includes(input)}
                            filterSort={(optionA, optionB) =>
                                (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
                            }
                            options={roleList}
                        >

                        </Select>

posted @ 2022-12-23 10:20  前端导师歌谣  阅读(69)  评论(0)    收藏  举报