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

the Select component when create option dynamically may cause the dynamically created option show many times. 使用select 创建动态选项时,动态创建的选项可能会出现多次。 #3206

Closed
linking2014 opened this issue Jun 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@linking2014
Copy link

linking2014 commented Jun 28, 2022

TuSimple/naive-ui version (版本)

2.30.4

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

Chrome(103.0.5060.53)

System and its version (系统及其版本)

Macos(12.4)

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/0pcgml

Reappearance steps (重现步骤)

  1. select the second compontent, then type 'dr' and select option 'Drive My Car' on the codesandbox page
  2. focus the select again, then select whether 'dr' or 'Drive My Car'
  3. focus the select again, you will see the dynamically created option show more than one time

  1. 选中 codesandbox 页面中第二个select,输入 dr ,然后选择 Drive My Car
  2. 再次选中第2个select,输入 dr,然后随便选择 dr 或者 Drive My Car
  3. 再次选择第2个select,这时选项列表里会出现2个 dr,而且可以通过类似的方式,出现多个dr,或者别的动态创建的选项

Expected results (期望的结果)

just show one dynamically created option
动态创建的选项只出现一次

Actual results (实际的结果)

dynamically created option can have many clones in the option list
动态创建的选项可在下拉列表中出现多个,甚至跟多个动态创建的选项夹杂在一起

Remarks (补充说明)

here's a picture to show this bug. http://cdn.zhaorulin.com/upic/2022-06-29-3961656441244_.pic.jpg
这里有张图来说明这个bug。 http://cdn.zhaorulin.com/upic/2022-06-29-3961656441244_.pic.jpg

@github-actions github-actions bot added the untriaged need to sort label Jun 28, 2022
@07akioni 07akioni added bug Something isn't working and removed untriaged need to sort labels Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants