What is the type for CreatableSelect? #5137
-
What type should I give the But I always get the same error: import CreatableSelect from 'react-select/creatable'; const selectMenu = useRef<any>();
useEffect(() => {
// Note: selected comes from the store and can be set to null elsewhere so I can't simply rely on the menu to handle it
if (selected === null && selectMenu.current) selectMenu.current.clearValue();
}, [selected]);
<CreatableSelect
ref={selectMenu}
/> I have searched through the docs and code but can't find the answer to this. Apologies if I missed something obvious! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is the type you're looking for: import { SelectInstance } from 'react-select'; It is mentioned in the v5 upgrade guide and the accessing internals example, but it should probably be added to the TypeScript guide as well. Feel free to create a PR to add it there if you have time. Also, thanks for your work in the three.js world. 🙂 |
Beta Was this translation helpful? Give feedback.
This is the type you're looking for:
It is mentioned in the v5 upgrade guide and the accessing internals example, but it should probably be added to the TypeScript guide as well. Feel free to create a PR to add it there if you have time.
Also, thanks for your work in the three.js world. 🙂