Skip to main content


loads items from a file

load(url: string | object, driver?: object | string): Promise<any>


  • url: string | DataProxy - the URL of an external file or DataProxy object with the URL configured
  • driver: object | string - optional, DataDriver or type of data ("json", "csv", "xml"), "json" by default


A promise of data loading.

Example"[path to this file]/file.xml", "xml");

Please note that if you specify the id fields in the loaded tree collection, their values should be unique. You can also omit the id fields in the tree collection. In this case they will be generated automatically.

The component will make an AJAX call and expect the remote URL to provide valid JSON data.

Data loading is asynchronous, so you need to wrap any after-loading code into a promise:{
//do something after load;

//do something after load;
// loadData executes a callback function after an asynchronous
// data loading has completed