File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ export interface HeTreeProps<T extends Record<string, any>> extends Partial<type
72
72
onDragOpen ?: ( stat : Stat < T > ) => void ,
73
73
openIds ?: Id [ ] ,
74
74
checkedIds ?: Id [ ] ,
75
- semiCheckedIds ?: Id [ ] ,
76
75
}
77
76
78
77
export function useHeTree < T extends Record < string , any > > (
@@ -89,8 +88,6 @@ export function useHeTree<T extends Record<string, any>>(
89
88
const openIdSet = useMemo ( ( ) => new Set ( props . openIds ) , [ openIdsStr ] )
90
89
const checkedIdsStr = useMemo ( ( ) => props . checkedIds ? [ ...props . checkedIds ] . sort ( ) . toString ( ) : '' , [ props . checkedIds ] )
91
90
const checkedIdSet = useMemo ( ( ) => new Set ( props . checkedIds ) , [ checkedIdsStr ] )
92
- const semiCheckedIdStr = useMemo ( ( ) => props . semiCheckedIds ? [ ...props . semiCheckedIds ] . sort ( ) . toString ( ) : '' , [ props . semiCheckedIds ] )
93
- const semiCheckedIdSet = useMemo ( ( ) => new Set ( props . semiCheckedIds ) , [ semiCheckedIdStr ] )
94
91
// mainCache ==================================
95
92
const mainCache = useMemo (
96
93
( ) => {
@@ -153,7 +150,7 @@ export function useHeTree<T extends Record<string, any>>(
153
150
index,
154
151
level,
155
152
open : props . openIds ? openIdSet . has ( id ) : true ,
156
- checked : checkedIdSet . has ( id ) ? true : ( semiCheckedIdSet . has ( id ) ? null : false ) ,
153
+ checked : checkedIdSet . has ( id ) ,
157
154
draggable : false ,
158
155
}
159
156
stats [ id ] = stat
You can’t perform that action at this time.
0 commit comments