Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Select组件开启autoComplete后请求竞态问题 Close: #8817 #8931

Merged

Conversation

lurunze1226
Copy link
Collaborator

@lurunze1226 lurunze1226 commented Nov 28, 2023

What

🤖[deprecated] Generated by Copilot at 4c16138

This pull request adds a feature to the Select component that allows it to cancel outdated autoComplete requests and show a loading spinner when fetching options. It also improves the performance and reliability of the WithRemoteConfig component by canceling previous requests when loading remote configuration. The documentation and the mock api are updated accordingly. The autoComplete prop is removed from the NestedSelect component as it is not used and causes conflicts.

🤖[deprecated] Generated by Copilot at 4c16138

Sing, O Muse, of the skillful coder who enhanced the Select component
With the power to cancel outdated requests, like swift-footed Achilles
Who chased the Trojans back to their walls, leaving behind his enemies
And showing a spinner to the user, as bright as the shield of Athena.

Why

How

🤖[deprecated] Generated by Copilot at 4c16138

  • Implement canceling outdated requests and showing loading spinner for autoComplete prop in Select component (link,link,link,link,link)
  • Apply the same feature to WithRemoteConfig component by adding fetchCancel variable and logic to Store model (link,link)
  • Remove unused and conflicting autoComplete prop from NestedSelect component (link)
  • Fix typo in debounce function name (link)
  • Reorder and group import statements by source in Select component (link)
  • Remove empty line in WithRemoteConfig component (link)
  • Add mock api for autoComplete3 that simulates random delay and names (link)
  • Change autoComplete api in example code of select.md to use the mock api (link)

@github-actions github-actions bot added the fix label Nov 28, 2023
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@hsm-lv hsm-lv merged commit d987218 into baidu:master Nov 29, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants