New empty row getting added automatically

Tags: #<Tag:0x00007efc5fd5a888>

I am using columnSummary and nestedRows in hadsontable and I am trying to write the logic to have all rows collapsed by default (which is not currently the case). I didnt found any built–in method for this so I was trying to achieve it with afterInit or afterRender callback.

However, when I run following code in any of the above callback, the summaryRow data gets corrupted. (after some notable time --like 1s) It adds N empty rows(I presume no of rows including collapsed), expands the nested Rows (there is no logic for expanding all rows) and shows summary in arbitrary Row. (not the row it was supposed to display).

 collapseRows(){
    const nestedRows = this.getPlugin('nestedRows')
    nestedRows.dataManager['rewriteCache']();
    nestedRows.collapsingUI['collapseAll']()
  }

If I(user) clicks on collapse/expand button on any row after words(It gets fixed)

1 Like

Welcome!

I don’t see any issue opened on Github for these two features in a relation. Can you share a demo, please?

Hi I wanted to follow up on this. I don’t have the demo but I think I know the cause for this one.

Column Summary doesn’t gets applied correctly if I use the above approach. May be because all rows where summary has to be applied should be visible. (clarification required ?)

Cant we have any hook that gets triggered after columnSummary is applied/calculated? I am certain that moving collapse logic in that hook will make this work.

I guess that this should be covered by the ‘afterChange’ hook as it relates to data. However it would be so much easier if you could share a demo or a recording of the behavior. Without an ability to reproduce - there is no issue.

I think that we can close the issue as there’s no response for more than 3 weeks.