ElemeFE / ElemeFE/element

[bug report] after the El tree component performs filtering, selecting the parent will also select the data outside the filtering

Open
#21,392 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.6

### OS/Browsers version
OS:win10 Browser:Chrome版本 96.0.4664.9(正式版本)dev (64 位)

### Vue version
2.6.11

### Reproduction Link
https://codepen.io/wisenchen/pen/GRvZrzL

### Steps to reproduce
1. 输入 11
2. 点击搜索
3. 勾选“p1" 或者 “root”
4. 点击 “reset”
5. 发现选中了p1下的所有子节点,即会选中除筛选结果外其他的节点

### What is Expected?
1. 在筛选状态下,选中父级也只会选中筛选结果的节点;
2. 或者能否提供一个配置项?用途为只选中可见节点;

另外我发现在/tree/src/model/node.js文件setChecked方法加一个visible === true的判断即可达到我目前的需求,如果这是个问题我能否提个PR

### What is actually happening?
选中父级时会把未显示的子节点选中

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.