API Reference > ui-components > Tree > useTreeModelSource useTreeModelSource Function Custom hook which creates a TreeModelSource. useTreeModelSource(dataProvider: TreeDataProvider): TreeModelSource note The model source has no direct dependency on the data provider, but we want a fresh model source whenever the data provider changes - that's the reason the hook takes a data provider. Parameter Type Description dataProvider TreeDataProvider Returns - TreeModelSource Defined in ui/components/src/ui-components/tree/controlled/TreeHooks.ts Line 68 Last Updated: 12 June, 2024