mirror of
https://github.com/element-plus/element-plus.git
synced 2025-04-06 16:30:35 +08:00
fix(components): [table] selected data not sync after change sort
This commit is contained in:
parent
7d76dea667
commit
b75a07892e
@ -217,6 +217,13 @@ function useWatcher<T>() {
|
||||
)
|
||||
selection.value = newSelection
|
||||
instance.emit('selection-change', newSelection.slice())
|
||||
} else {
|
||||
const hasSortChanged = selection.value.some(
|
||||
(item, index) => item !== data.value[index]
|
||||
)
|
||||
if (hasSortChanged) {
|
||||
selection.value = data.value.slice()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user