File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
13
13
createRecord ,
14
14
shouldUpdateRecords ,
15
15
updateRecord ,
16
- updateRecordOnWalk ,
16
+ updateRecordOnNewData ,
17
17
} from './utils' ;
18
18
19
19
export type FixedSizeNodeData = NodeData ;
@@ -50,7 +50,7 @@ const computeTree = createTreeComputer<
50
50
createRecord,
51
51
shouldUpdateRecords,
52
52
updateRecord,
53
- updateRecordOnWalk ,
53
+ updateRecordOnNewData ,
54
54
} ) ;
55
55
56
56
export class FixedSizeTree < T extends FixedSizeNodeData = NodeData > extends Tree <
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export type TreeCreatorOptions<
136
136
recordId : string | symbol ,
137
137
options : TUpdateOptions ,
138
138
) => void ;
139
- updateRecordOnWalk : ( record : TNodeRecord , options : TUpdateOptions ) => void ;
139
+ updateRecordOnNewData : ( record : TNodeRecord , options : TUpdateOptions ) => void ;
140
140
} > ;
141
141
142
142
export type TreeComputer <
@@ -173,7 +173,7 @@ export const createTreeComputer = <
173
173
createRecord,
174
174
shouldUpdateRecords,
175
175
updateRecord,
176
- updateRecordOnWalk ,
176
+ updateRecordOnNewData ,
177
177
} : TreeCreatorOptions <
178
178
TNodeComponentProps ,
179
179
TNodeRecord ,
@@ -228,7 +228,7 @@ export const createTreeComputer = <
228
228
records [ id as string ] = createRecord ( value , state ) ;
229
229
} else {
230
230
record . data = value ;
231
- updateRecordOnWalk ( record , options ) ;
231
+ updateRecordOnNewData ( record , options ) ;
232
232
}
233
233
}
234
234
Original file line number Diff line number Diff line change @@ -9,7 +9,11 @@ import Tree, {
9
9
TreeState ,
10
10
UpdateOptions ,
11
11
} from './Tree' ;
12
- import { shouldUpdateRecords , updateRecord , updateRecordOnWalk } from './utils' ;
12
+ import {
13
+ shouldUpdateRecords ,
14
+ updateRecord ,
15
+ updateRecordOnNewData ,
16
+ } from './utils' ;
13
17
14
18
export type VariableSizeNodeData = Readonly < {
15
19
/** Default node height. Can be used only with VariableSizeTree */
@@ -94,8 +98,8 @@ const computeTree = createTreeComputer<
94
98
updateRecord ( record , recordId , options ) ;
95
99
} ,
96
100
97
- updateRecordOnWalk : ( record , options ) => {
98
- updateRecordOnWalk ( record , options ) ;
101
+ updateRecordOnNewData : ( record , options ) => {
102
+ updateRecordOnNewData ( record , options ) ;
99
103
100
104
if ( options . useDefaultHeight ) {
101
105
record . height = record . data . defaultHeight ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const updateRecord: DefaultTreeCreatorOptions['updateRecord'] = (
54
54
: opennessState ?. [ recordId as string ] ?? record . isOpen ;
55
55
} ;
56
56
57
- export const updateRecordOnWalk : DefaultTreeCreatorOptions [ 'updateRecordOnWalk ' ] = (
57
+ export const updateRecordOnNewData : DefaultTreeCreatorOptions [ 'updateRecordOnNewData ' ] = (
58
58
record ,
59
59
{ useDefaultOpenness = false } ,
60
60
) => {
You can’t perform that action at this time.
0 commit comments