fix: preserve selected row IDs without filtering by current list (#17994)

This commit is contained in:
chanx
2026-08-07 17:06:05 +08:00
committed by GitHub
parent 8562623bef
commit 2eb1ef6c67

View File

@@ -42,7 +42,8 @@ export function useSelectedIds<T extends Array<{ id: string }>>(
.map((x) => x.id);
} else {
// ID-based selection (when getRowId is used)
return selectionKeys.filter((id) => list.some((item) => item.id === id));
// return selectionKeys.filter((id) => list.some((item) => item.id === id));
return selectionKeys;
}
}, [list, rowSelection]);