Closed brianjgeiger closed 10 years ago
Very cool, though not working for me.
I've added to my Hgrid config, next to where I already had the onExpand and onCollapse callbacks,
getExpandState: function(folder) {
return folder.expanded;
},
Expanded is already an property of my items, and I've verified in other parts of the code that expanded is being set properly. I may have to look at this with you after lunch.
Ok, let's have a look today.
Very nearly there. If you have a nested folder that's open, and you collapse the containing folder then re-expand it, you will get a doubling of contents when the cached version of the internal folder is expanded as part of the cache, then expanded again because of the flag being set from the lazy loading (or something similar to that).
Hmmmm. It's happening for me whenever I collapse and expand a node. Anything inside it is being re-added.
Should be fixed now, eh @brianjgeiger ?
Working great
There are views on the OSF (in the feature branch for the project organizer) to add a state for if the node is expanded or collapsed and to save the expand/collapse state on a per-user basis. What would be keen is an option for the HGrid to respect that state when lazy loading (i.e. if expanded == true, load that folder automatically), and to POST the expand/collapse state when someone expands and collapses a node.