[Component] [table] Issue happens when listening the select-all event
lhyUnited opened this issue · comments
lhyUnited commented
Bug Type: Component
Environment
- Vue Version:
3.5.0-alpha.2
- Element Plus Version:
2.7.2
- Browser / OS:
124.0.6367.119 (Official Build) (x86_64)
- Build Tool:
Other
Reproduction
Related Component
el-table
Reproduction Link
Steps to reproduce
Steps:
- Create a Table with two or more types of data and a Select to change different types of data to show.
- First select some items on the Food
- Switch to Drink types of data
- Select all and unselect all
- Switch back to Food, do nothing
- Switch to Drink again and check the result
What is Expected?
The select-all header-cell should be unchecked since there is no item being selected.
What is actually happening?
The select-all header-cell is selected.
Additional comments
(empty)
lhyUnited commented
Yes, it works well. But the root cause is here, table gives selection out which would cause object reference issue. The data of listeners could change unexpectedly
mobai commented
because when selecting all and canceling, the selection is not updated again. When switching to Food, Food and Drink have the same reference.