Here I want to detect which menu is clicked with selectedIndex. The problem is that the selectedindex changes in the drop-down menu. Sometimes the item in the 4th row becomes the 1st item. How can I solve this?
Can you use currentValue (or text)? Most likely that will work unless you have repeats in which case, you may need to assign custom properties to each item and check those.
Oh... list.accordionIndex is the same as list.selected.listZID. Sitll working on the collapsing. It is really tricky - can collapse outer layer but inside layer still are open. So may have to remake the list from the beginning then open it to the selected.
Will have to look again later... brain dead. No easy way to remake the list from within... should not have to remake tabs. But once they are added, they remain added so when you open up a branch you already opened, it remains how you left it inside. We do not have an easy way to close all those. We would have to recursively loop through and close each.... so, later, perhaps. If you just have two levels, we can probably do it now. I have a fix for closing all the first level.