File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/@react-stately/data/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export interface TreeData<T extends object> {
55
55
* Replace the whole tree.
56
56
* @param newItems - The new items to replace the tree with.
57
57
*/
58
- replaceAll ( newItems : T [ ] ) : void ,
58
+ setRootItems ( newItems : T [ ] ) : void ,
59
59
/**
60
60
* Inserts an item into a parent node as a child.
61
61
* @param parentKey - The key of the parent item to insert into. `null` for the root.
@@ -262,7 +262,7 @@ export function useTreeData<T extends object>(options: TreeOptions<T>): TreeData
262
262
getItem ( key : Key ) {
263
263
return nodeMap . get ( key ) ;
264
264
} ,
265
- replaceAll ( newItems : T [ ] ) {
265
+ setRootItems ( newItems : T [ ] ) {
266
266
setItems ( buildTree ( newItems , new Map ( ) ) ) ;
267
267
} ,
268
268
insert ( parentKey : Key | null , index : number , ...values : T [ ] ) {
You can’t perform that action at this time.
0 commit comments