Expandable Rows Not Collapsing When Using "mode: all"

Hi Everyone!

I am having an issue with expandable rows. I have a tag column which displays the number of linked records from another table and when you click on the tag column, it is supposed to show the linked record's names.

I setup two event handlers, both of which run scripts. The first script is supposed to collapse any previously expanded rows, and the second script is supposed to expand the row you just clicked on.

Script 1:
tableName.collapseRows({
mode: "all"
});

Script 2:
tableName.expandRows({
mode: "key",
key: currentRow._id
})

Expanding the row usually works, but the collapsing of all rows is not working and from looking at the function definition, it seems like it should.
image

Hi there,

Thanks for reaching out to us! I noticed a similar thread where a user implemented this workaround. Would it work for your usecase here?

And just working on this a bit more, are there any debounces to your scripts here?