I have an Async react-select (v2) that changes its loadOptions based on tabs change.
The issue is that when switching tabs the select is still showing the results of the previous api call that were cached. The cache needs to be purged every time the tabs change.
<Async
cacheOptions
isClearable
loadOptions={props.loadOptions}
{...this.selectProps(inputText, props)}
/>
I have seen in a few places that the React-Select v2 will include the option to reset the cache for the Async select, but I couldn't find in the documentation an example on how to do it.
Please advise.