API Reference > ui-components > Tree > MutableTreeModel > setNumChildren setNumChildren Method Sets the number of child nodes a parent is expected to contain. All child nodes of this parent will be subsequently removed. setNumChildren(parentId: undefined | string, numChildren: undefined | number): void Parameter Type Description parentId undefined | string numChildren undefined | number Returns - void Defined in ui/components/src/ui-components/tree/controlled/TreeModel.ts Line 373 Last Updated: 12 June, 2024