cos-archives / hgrid

[UNMAINTAINED] A Javascript-based hierarchical grid that can be used to manage and organize file/folder-like data
Apache License 2.0
23 stars 14 forks source link

HGrid.Col.Name.showExpander() not refreshing in all situations #94

Open brianjgeiger opened 10 years ago

brianjgeiger commented 10 years ago

There are a few issues in https://github.com/CenterForOpenScience/openscienceframework.org/issues/726 that seem to be because I have a showExpander function that returns the correct value but the view isn't being updated all the time.

The specific items from the original are: There are a number of cases when one would expect the ± button to be hidden when it is shown and vice-versa. Here's what I've found:

This may not have been the original cause in all cases, but I am maintaining a separate "childrenCount" now (so we know whether to show the disclosure control for a folder that isn't already lazy-loaded), and I'm updating it under circumstances when the HGrid wouldn't necessarily know that things have changed.

The only way I can force things to work is to reload the folder above the folder with the control that isn't updating.

brianjgeiger commented 10 years ago

This is fixed in the Project Organizer, but HGrid should be able to track unloaded children counts on loaded nodes and show the expand controls as appropriate. Presuming the back-end gave a children count to the HGrid, of course.