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

[Bug Report] Tree组件在懒加载时,default-checked-keys设置选择前两个时,会把当前层的所有兄弟node选中 #21932

Open
kiss-keray opened this issue Jun 18, 2022 · 1 comment

Comments

@kiss-keray
Copy link
Contributor

kiss-keray commented Jun 18, 2022

Element UI version

2.15.7

OS/Browsers version

macOS 12.4/Chrome 102.0.5005.115

Vue version

2.6.14

Reproduction Link

https://codepen.io/kiss-yu/pen/abqxNBe

Steps to reproduce

  1. 将Tree设置为懒加载,被设置default-checked-keys为大于第一级的某级列表的前两个node-key(只要最前面的node-key连选了>=2个都可以)。
  2. 展开Tree,会发现预期只选择某层的前两个node,实际会把当前层的全部兄弟node选中
    正确的设置默认值:

正常

错误的设置默认值:实际我只设置了两个node-key,实际把全部的node选中了。

错误

What is Expected?

只选中default-checked-keys设置的node

What is actually happening?

选中了所有兄弟node

@kiss-keray
Copy link
Contributor Author

2.15.9版本一样存在这个问题

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

No branches or pull requests

1 participant