Refresh the items in Select.Async
See original GitHub issueI have the following Select.Async and a corresponding loadOptions function to load items.
<Select.Async loadOptions={loadOptions}
value={this.state.data.my_value}
onChange={this.logChange}
allowCreate={true}
backspaceRemoves={true}
newOptionCreator={this.optionCreator}
/>
On a separate UI action, I want to reload this Select.Async items. I am looking for a function to refresh this Select options or invalidate them.
Any help is much appreciated.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:35 (3 by maintainers)
Top Results From Across the Web
How trigger AsyncSelect to reload options in ReactJS
When we choose a category from the first AsyncSelect, I need to load it's sub-categories to the second one. AsyncSelect loads the items...
Read more >Async - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >Asynchronous I/O (asyncio) - SQLAlchemy 1.4 Documentation
refresh () method will expire the attributes on related objects, but not necessarily refresh those related objects assuming eager loading is not ...
Read more >Blazor DropDownList Refresh Data - Documentation - Telerik
Data = Options.ToDataSourceResult(args.Request).Data; } protected override async Task OnInitializedAsync() { Options = new List<string>() { "one", "two", ...
Read more >Select - Examples - Components - Atlassian Design System
Use AsyncCreatableSelect to allow users to create new options asynchronously. For example, execute async calls before creating the option. What city do you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok i figured out that it worked the whole time. The problem was that i worked with a mocked fetch. Whatever i wrote into the select, my fetch returned a bunch of records. What i didn’t realize was, that the react-select has a filter that filters my loaded records with the string i entered to search. What happend is, on blur my entered text disappears and no filter was applied. Setting filterOption solved it for me in this case:
filterOption={() => (true)}
This works for me: