I have a use case in which I want the following things:
- Fill the dropdown with predefined elements
- Make a fetch and pull some additional elements when the menu gets opened (emulated with a
setTimeoutand aPromisein my demo) - Make it possible to create new elements by typing inside the dropdown without filtering the currently shown elements
"1" and "2" are easy to implement, but adding "3" to the mix seems impossible. As soon as I start typing, the "Create new" element shows up, and everything else is filtered.
Demo: https://codesandbox.io/s/react-select-v3-sandbox-forked-x3qy2?file=/example.js
It seems that this should be possible by using the filterOption={() => true} prop in order to avoid elements to get filtered / hidden, but in practice it doesn't seem to be working.
How can I stop select2 from filtering the current elements?