Replies: 3 comments 1 reply
-
@antollika were you able to find a solution or workaround for your problem? I've also ended up in the same place |
Beta Was this translation helpful? Give feedback.
-
Hi @antollika and @peyssoa, I am not sure if I am understanding problem correctly but you want to render a custom component in place of 'No Options found' component? |
Beta Was this translation helpful? Give feedback.
-
@peyssoa my solution was to customize NoOptionsMessage component and use useEffect to call a onSearch prop passed to parent Select component:
We have some cases that we have more than 2000 options. If that's the case we wan't to search all the options not just the first 2000. If we have a miss in the first 2000 options then NoOptionsMessage component will call onSearch function in the parent component which will fire a backend call and make a fetch with the inputValue. We also use virtualization if there is more than 2000 options in the select component to make everything run smoothly. |
Beta Was this translation helpful? Give feedback.
-
I have a custom Menu component for my select and I have to render a custom component when all options are filtered out
noOptionsMessage
does not suit me. I need a separate variable likeisNoOptions
to something similar.I've also tried to check options length but it always the same even if all of them are filtered out by the input value
I have only one solution for now - filter options with
inputValue
by myself but why I should do it if select already did it?Beta Was this translation helpful? Give feedback.
All reactions