|
@@ -66,13 +66,13 @@ export function useRowSelection(
|
|
|
selectedRowKeysRef.value = rowKeys;
|
|
|
const allSelectedRows = findNodeAll(
|
|
|
toRaw(unref(tableData)).concat(toRaw(unref(selectedRowRef))),
|
|
|
- (item) => rowKeys.includes(item[unref(getRowKey) as string]),
|
|
|
+ (item) => rowKeys?.includes(item[unref(getRowKey) as string]),
|
|
|
{
|
|
|
children: propsRef.value.childrenColumnName ?? 'children',
|
|
|
},
|
|
|
);
|
|
|
const trueSelectedRows: any[] = [];
|
|
|
- rowKeys.forEach((key: string) => {
|
|
|
+ rowKeys?.forEach((key: string) => {
|
|
|
const found = allSelectedRows.find((item) => item[unref(getRowKey) as string] === key);
|
|
|
found && trueSelectedRows.push(found);
|
|
|
});
|