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

can't close tag when check strategy is parent and default-value contains all children #2605

Closed
whale2002 opened this issue Mar 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@whale2002
Copy link
Contributor

whale2002 commented Mar 10, 2022

TuSimple/naive-ui version (版本)

2.26.3

Vue version (Vue 版本)

3.2.31

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

Chrome(97.0.4692.99)

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

Linux

Node version (Node 版本)

V14.17.5

Reappearance link (重现链接)

https://codesandbox.io/s/g9jqj7

Reappearance steps (重现步骤)

  1. 点击parent 2. 关闭tag

Expected results (期望的结果)

该tag消失

Actual results (实际的结果)

tag不消失

Remarks (补充说明)

感觉parent和child有点冲突。
当把 default-value 设置为某个父节点的所有子节点以后,勾选策略为parent的情况下,初次渲染无法移除该父节点。

@github-actions github-actions bot added the untriaged need to sort label Mar 10, 2022
@whale2002
Copy link
Contributor Author

src/tree-select/src/TreeSelect.tsx
image

uncontrolledValueRef 包裹的是数组,但是当点击tag时,移除的内容跟数组不匹配,无法达到删除的目的

image
image

@07akioni 07akioni added bug Something isn't working and removed untriaged need to sort labels Mar 10, 2022
jaulz pushed a commit to jaulz/naive-ui that referenced this issue Mar 11, 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