Closed apfister closed 10 years ago
If you change the idProperty
you must also change the value of parent
. For example, the parent of "Audi" and "BMW" now becomes "0". The parent of "A3" becomes "1":
var carData = [
{ name:"Cars" ,parent: null , type:"toys", someId: "0" },
{ name:"Audi" ,parent:"0", type:"factory", someId: "1" },
{ name:"BMW" ,parent:"0", type:"factory", someId: "2" },
{ name:"A3" ,parent:"1", type:"sedan", someId: "3" },
{ name:"Q7" ,parent:"1", type:"suv", someId: "4" },
{ name:"M3" ,parent:"2" , type:"sedan", someId: "5" },
{ name:"535" ,parent:"2" , type:"sedan", someId: "6" },
{ name:"750" ,parent:"2" , type:"sedan", someId: "7" },
];
got it, thanks!
trying to use the Heirarchy example with a different attribute for "idProperty" and i only see the root node appear.
edit: using v0.9.4
test data: