debabratapatra / angular-tree-grid

Angular 10 Tree Grid
https://curiouslinks.com/pages/angular-tree-grid/demo
MIT License
31 stars 17 forks source link

Tree Structure fails for the given data #39

Closed medojusrinivas closed 4 years ago

medojusrinivas commented 4 years ago

When I use this data it is breaking the tree structure data: any = [ { "id": "1", "name": "Architecture Phase II", "parent": "" }, { "id": "2", "name": "Architecture Practice Edited", "parent": "1" }, { "id": "8c7fda5e-2492-45ff-b5b5-2c8b34928df3", "name": "Desijnjngn", "parent": "2" }, { "id": "a6c1-4bdf-9709-795bf3914dc7", "name": "Desigdn the house", "parent": "8c7fda5e-2492-45ff-b5b5-2c8b34928df3" },

{ "id": "mAcfc08c81-491c-45ad-ab32-b4e3cd89f957", "name": "Moving In", "parent": "" }, { "id": "mA08b9d248-36ff-40de-8254-97518ba1b91a", "name": "Decorating", "parent": "mAcfc08c81-491c-45ad-ab32-b4e3cd89f957" }, { "id": "mA9aff9de5-18cd-4fe8-929a-f2ff7c6bb810", "name": "Painting", "parent": "mA08b9d248-36ff-40de-8254-97518ba1b91a" },

{ "id": "mAa0100243-4a79-436c-9a62-47c8c8caa23c", "name": "Architecture Practice Edite", "parent": "mAcfc08c81-491c-45ad-ab32-b4e3cd89f957" }, { "id": "8c7fda5e-2492-45ff-b5b5-2c8b34928df3", "name": "Design", "parent": "mAa0100243-4a79-436c-9a62-47c8c8caa23c" }

];

What can be the issue? When I changed the IDs it is working fine. Getting below error: parent_pathx.join is not a function.

Do we have any limitation on ID length or characters?

medojusrinivas commented 4 years ago

Found there is duplicate IDs. Hence closing the issue