'Tabulator 5.1 groups not updating on hide() or show()

I am just trying to get all groups to expand or collapse in 5.1 and nothing seems to work right. For example;

groups = tabulator.getGroups();
groups.forEach(function(group) { group.show() }

This will only expand the first group. Also, isVisible now reports that those groups are now visible, but they do not expand.

table.groupBy() seems to mostly work as expected but always fails the first time, so must be issued on table generation.

I tried setting group._group.visible and other such things directly which don't work either.

There are no examples currently for 5.1 on the site.

thank you for any help

So this does work but is presumably not great;

groups = table.getGroups(); 
for (let i=0; i < groups.length; i++;) { table.getGroups()[i].show();}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source