Skip to content

Commit 8e6dd50

Browse files
ppxbCharles7c
authored andcommitted
fix(useTable): double click search inpurt cause error issue
1 parent 0c77f52 commit 8e6dd50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hooks/modules/useTable.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function useTable<T extends U, U = T>(api: Api<T>, options?: Options<T, U
4141
// 多选
4242
const selectedKeys = ref<(string | number)[]>([])
4343
const select: TableInstance['onSelect'] = (rowKeys) => {
44-
selectedKeys.value = rowKeys
44+
if (Array.isArray(rowKey)) {
45+
selectedKeys.value = rowKeys
46+
}
4547
}
4648

4749
// 全选

0 commit comments

Comments
 (0)