mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-04 19:28:05 +00:00
fix(FormTable): Invert select bug (#3412)
This commit is contained in:
@@ -61,10 +61,12 @@
|
||||
function onSelect(record, selected) {
|
||||
if (selected) {
|
||||
state.selectedRowKeys.push(record.id);
|
||||
} else {
|
||||
state.selectedRowKeys
|
||||
.splice(0)
|
||||
.push(...state.selectedRowKeys.filter((id) => id !== record.id));
|
||||
return;
|
||||
}
|
||||
const delIdx = state.selectedRowKeys.indexOf(record.id);
|
||||
|
||||
if (delIdx !== -1) {
|
||||
state.selectedRowKeys.splice(delIdx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user