I'm trying to use AsyncCreatableSelect with example data :
[
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
]
My code looks like this :
const fetchData = () => {
return new Promise(resolve=>{
resolve([
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
])
})
}
const component = () => {
return(
<AsyncCreatableSelect
cacheOptions
defaultOptions
loadOptions={fetchGameList}
/>
);
}
And the problem is that, the data is correctly loaded but when I type, I don't get any recommendation compared to the examples on the website :
Whatever I type in the input, the result is always the same.
