Closed ghost closed 4 years ago
@peterjcoffman - you could try importing just the windowed menu list component from react-windowed-select
and then plugging that into react-select
's Async, Createable or AsyncCreatable component via the components
prop:
import { WindowedMenuList } from 'react-windowed-select;
import Creatable from 'react-select/creatable';
function App (props) {
return (
<CreatableSelect components={{ MenuList: WindowedMenuList }} />
);
};
Note: I haven't tested this so let me know if it works.
It turns out I don't need the Async or Creatable at this time, so I won't be needing this workaround.
Ok closing for now.
At this time, I don't see how to make Async, Creatable, or AsyncCreatable Selects with this library.
It is possible to get some of this behavior using functions exported from react-select, e.g.
But this requires importing these functions directly from react-select rather than from react-windowed-select, and I am not sure if those components will work the same. The components exported from react-select are wrapped in a StateManager using manageState (for an example, see the last line of Creatable.js), but I cannot replicate this since the manageState function is not exported.