ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.13k stars 14.64k forks source link

[bug report] tab tree, select all checebox, row children can't be selected / deselected. #17889

Open Qiu-lin opened 5 years ago

Qiu-lin commented 5 years ago

Element UI version

2.12.0

OS/Browsers version

win10/chrome 78.0.3904.70

Vue version

2.6.10

Reproduction Link

https://codepen.io/pen/?editors=1010

Steps to reproduce

At table tree,

  1. when user clicks the checkbox in table header, the checkbox in row children hasn't be selected; 2.first ,user selects row children, then click the checkbox in table header to select all. At last,deselect the checkbox in table header, the checkbox in row children's status hasn't be changed,it‘s still at selected status. (在树形数据的表格中,点击切换表头全选checkbox状态,有树形数据的表格行checkbox状态不能联动。 先选择树形数据子表格的checkbox,再点击全选checkbox,当取消表格所有行全选状态时,树形数据子表格的checkbox状态任然是选择状态。)

What is Expected?

when click the checkbox in tabel header, the all row of table should be selected/deselected. (1.点击切换表头全选checkbox状态的时候,表格所有行应该处于选中或者未选中状态。 2.点击切换有children 的行的checkbox状态时,默认切换该行所有children相应的checkbox的状态。)

What is actually happening?

when click the checkbox in tabel header, the all row of table isn't selected/deselected. (点击切换表头全选checkbox状态的时候,children子表格checkbox状态没有与全选状态联动。)

element-bot commented 5 years ago

Translation of this issue:

Element UI version

2.12.0

OS / browsers version

Win10 / Chrome 78.0.3904.70

Vue version

2.6.10

Reproduction link

HTTPS: / / codepen. IO / pen /? Editors = 1010

Steps to reproduce

At table tree,

  1. When user clicks the checkbox in table header, the checkbox in row children have't be selected;
  2. First, user select s row children, then click the checkbox in table header to select all. Last, deselect the checkbox in table header, the checkbox in row children's status has't be changed, it's still at selected status.

(in the table with tree data, click to switch the header to select all checkboxes. The checkboxes of table rows with tree data cannot be linked. First select the checkbox of the tree data sub table, and then click Select all checkbox. When all rows of the table are deselected, the checkbox status of the tree data sub table is still selected.)

What is expected?

When click the checkbox in label header, the all row of table should be selected / deselected.

(1) when clicking to switch the header to select all checkboxes, all rows in the table should be selected or not.

  1. Click to switch the checkbox status of the row with children. By default, the status of all checkboxes corresponding to children in the row will be switched.)

What is actually happening?

When click the checkbox in label header, the all row of table isn't selected / deselected.

(when clicking to switch the header to select all checkbox status, the children sub table checkbox status is not linked with the select all status.)

jhmei commented 5 years ago

我也碰到了

pony5551 commented 4 years ago

以上问题什么时间能修复?

HenryTSZ commented 4 years ago

今天刚碰到, 就想着看看有没有人提 bug, 果然

HenryTSZ commented 4 years ago

这里有大佬解决了, 不过还有点小问题, 但不影响使用 el-table树形结构的复选 - 个人文章 - SegmentFault 思否

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.