Skip to content

Conversation

AlbertAZ1992
Copy link

To fix this issue: ant-design/ant-design#25228
Input update firstly when value was pasted, but triggerOnSearch will call setMergedValue before Input didupdate, so triggerOnSearch should be assign in next macrotask.

@vercel
Copy link

vercel bot commented Jul 2, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/select/opu8ujryh
✅ Preview: https://select-git-fork-albertaz1992-bugfix-select-value-dup-on-paste.react-component.vercel.app

@AlbertAZ1992 AlbertAZ1992 changed the title fix: trigger search after input value onchanged fix: trigger search after input value updated Jul 2, 2020
@vercel vercel bot temporarily deployed to Preview July 2, 2020 11:33 Inactive
@AlbertAZ1992 AlbertAZ1992 changed the title fix: trigger search after input value updated fix: input onChange fires with duplicated value when wrapped in select and using paste Jul 5, 2020
@zombieJ
Copy link
Member

zombieJ commented Jul 5, 2020

Thanks for contributing. Paste should not handle input value since it breaks unique value fetch logic which should be removed in paste event.

@zombieJ zombieJ mentioned this pull request Jul 5, 2020
@zombieJ zombieJ closed this in #517 Jul 5, 2020
@AlbertAZ1992
Copy link
Author

Thanks for contributing. Paste should not handle input value since it breaks unique value fetch logic which should be removed in paste event.

You are right, that is a better way, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants