mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
fix(Table): fix the problem that selectedRow has no value
This commit is contained in:
parent
3f76911745
commit
37a163f3f1
@ -487,6 +487,16 @@ export const Table = implementRuntimeComponent({
|
||||
checkCrossPage: checkCrossPage,
|
||||
// This option is required to achieve multi-selection across pages when customizing paging
|
||||
preserveSelectedRowKeys: useCustomPagination ? checkCrossPage : undefined,
|
||||
onSelect: (selected, record) => {
|
||||
mergeState({
|
||||
selectedRow: selected ? record : undefined,
|
||||
});
|
||||
},
|
||||
onSelectAll: () => {
|
||||
mergeState({
|
||||
selectedRow: undefined,
|
||||
});
|
||||
},
|
||||
onChange(selectedRowKeys, selectedRows) {
|
||||
mergeState({
|
||||
selectedRowKeys: selectedRowKeys as string[],
|
||||
|
Loading…
Reference in New Issue
Block a user