fix: Select组件开启autoComplete后请求竞态问题 Close: #8817 #8931
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
🤖[deprecated] Generated by Copilot at 4c16138
This pull request adds a feature to the
Select
component that allows it to cancel outdatedautoComplete
requests and show a loading spinner when fetching options. It also improves the performance and reliability of theWithRemoteConfig
component by canceling previous requests when loading remote configuration. The documentation and the mock api are updated accordingly. TheautoComplete
prop is removed from theNestedSelect
component as it is not used and causes conflicts.🤖[deprecated] Generated by Copilot at 4c16138
Why
How
🤖[deprecated] Generated by Copilot at 4c16138
autoComplete
prop inSelect
component (link,link,link,link,link)WithRemoteConfig
component by addingfetchCancel
variable and logic toStore
model (link,link)autoComplete
prop fromNestedSelect
component (link)debounce
function name (link)Select
component (link)WithRemoteConfig
component (link)autoComplete3
that simulates random delay and names (link)autoComplete
api in example code ofselect.md
to use the mock api (link)