I am trying to create a wrapper component around antd's Select, that adds a debounced function to handle search input. I am using lodash's debounce util function.
However I run into a bug where:
I have created a minimal sandbox that replicates this behavior here: https://codesandbox.io/s/vigorous-glade-495f2z?file=/src/Select.jsx .
Remove the searchValue
props from the Select
component.
const propsToSelect = {
...props,
style: { width: "300px" },
onSearch: searchHandlerWithDebounce,
filterOption: false,
options: []
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.