problem with Flat, Parent-Referencing List (tutorial example)

6 views
Skip to first unread message

Klaus Buecher

unread,
Dec 10, 2021, 12:17:56 AM12/10/21
to Fancytree Q&A
I am using the example with the flat parent referencing list from https://github.com/mar10/fancytree/wiki/TutorialLoadData.

My change: data doesn't come by url/postProcees, I have a static, flat array for testing and set source: convertData(myArray),.

result: the last sibling in the tree is always highlighted. If I select the child of item 1, both the child and the last sibling are highlighted.

looking at the html, all items have id's, but the lastsibling has no id.

any help is appreciated.

thanks,

Klaus

Klaus Buecher

unread,
Dec 10, 2021, 12:40:16 AM12/10/21
to Fancytree Q&A
answering my own question:

the example code holds this: 
       c.selected = (c.status === "completed");
 
so .. all entries that have completed set, are selected and highlighted. Thus, multipe treeelements are highlighted.

Reply all
Reply to author
Forward
0 new messages