Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses the second issue mentioned in the linked issue. While the previous commit makes this change unnecessary for regular use cases, the issue is still present when debouncing. By clearing out `this._callback`, intermediary searches (e.g. 'Ti' when 'Tim' is already fetched) won't cause the options for 'Tim' to change when the request for 'Ti' completes.
- Loading branch information
79f478e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timhwang21
Add this would be better :
this.setState({ isLoading: false, options: cache[inputValue] });
.Otherwise when hitting the cache during a promise, the loading icon will remain and the menu won't appear.