Skip to content

Commit 6168d3b

Browse files
mryorkjevin98
authored andcommitted
!475 fix(table): 数据为空时表头checkbox应为未选中状态
* fix(table): 数据为空时表头checkbox应为未选中状态
1 parent 9a2f00f commit 6168d3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/component/component/table/hooks/useTableSelected.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export function useTableSelected(props: RequiredTableProps, emit: TableEmit) {
6767
watch(
6868
() => [tableMSelectedKeys, allKeys.value],
6969
([tableMultipleSelectedKeysValue, allKeysValue]) => {
70-
allMSelected.value = allKeysValue.every(key =>
70+
allMSelected.value = allKeysValue.length > 0 && allKeysValue.every(key =>
7171
tableMultipleSelectedKeysValue.includes(key),
7272
);
73-
someMSelected.value = allKeysValue.some(key =>
73+
someMSelected.value = allKeysValue.length > 0 && allKeysValue.some(key =>
7474
tableMultipleSelectedKeysValue.includes(key),
7575
);
7676

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy