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
7272 onDragOpen ?: ( stat : Stat < T > ) => void ,
7373 openIds ?: Id [ ] ,
7474 checkedIds ?: Id [ ] ,
75- semiCheckedIds ?: Id [ ] ,
7675}
7776
7877export function useHeTree < T extends Record < string , any > > (
@@ -89,8 +88,6 @@ export function useHeTree<T extends Record<string, any>>(
8988 const openIdSet = useMemo ( ( ) => new Set ( props . openIds ) , [ openIdsStr ] )
9089 const checkedIdsStr = useMemo ( ( ) => props . checkedIds ? [ ...props . checkedIds ] . sort ( ) . toString ( ) : '' , [ props . checkedIds ] )
9190 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 ] )
9491 // mainCache ==================================
9592 const mainCache = useMemo (
9693 ( ) => {
@@ -153,7 +150,7 @@ export function useHeTree<T extends Record<string, any>>(
153150 index,
154151 level,
155152 open : props . openIds ? openIdSet . has ( id ) : true ,
156- checked : checkedIdSet . has ( id ) ? true : ( semiCheckedIdSet . has ( id ) ? null : false ) ,
153+ checked : checkedIdSet . has ( id ) ,
157154 draggable : false ,
158155 }
159156 stats [ id ] = stat
You can’t perform that action at this time.
0 commit comments