Pivot - rows initially collapsed (on apply)

Hi there webix team!
To show rows initially collapsed I’ve used your solution from here:
https://forum.webix.com/discussion/2265/pivot-table-way-to-have-initial-display-with-all-rows-collapsed

But this only works on ‘ready’. After ‘apply’ all rows expand. I’ve tried to call ‘this.$$(“data”).closeAll();’ in ‘onBeforeApply’ and ‘onApply’ callbacks but it doesn’t help.
Thanks!

Check this:
https://snippet.webix.com/qt2mfu29

Hello @vitaliy_kretsul ,

We found a mistake in the documentation. So we will correct it
The point is that onApply is the event of the popup, not the pivot. So you need to add this event to the popup as

view:"pivot"
...
  popup:{
    on:{
      onApply: function(){ 
        webix.delay(function(){
          $$("pivot").$$("data").closeAll();
        });
      }
    }
  }

Please check the sample: https://snippet.webix.com/8x5ztxxd

Perfect! Thanks!