[GH #1950, #7742] Property 'collapsingUI' does not exist on type 'NestedRows'

Tags: #<Tag:0x00007efc60d13a18> #<Tag:0x00007efc60d138d8>

Hi,

On v12, I am trying to collapse nestedRows using following:

“hotInstance.getPlugin(‘nestedRows’).collapsingUI.collapseAll();”

But I’m getting following error:

Property ‘collapsingUI’ does not exist on type ‘NestedRows’

Please advise.

Hi @thethakuri_handsonta

I checked it with the latest version - 14.4.0, and it works correctly: https://jsfiddle.net/handsoncode/fmj20yvc/ It also works well with v. 12. Can you please share your implementation so we can check what the problem might be?

Hi Adrian,

I am testing in Angular.

Sample code:

const hotInstance = this.hotRegisterer.getInstance("my_hot");
hotInstance.getPlugin('nestedRows').collapsingUI.collapseAll();

There is no method “collapsingUI” available in the plugin. Please refer to attached
screenshots.

hot_issue_01

hot_issue_02

Hi @thethakuri_handsonta

I checked it in this Angular example: https://codesandbox.io/s/handsontable-forked-gldglh?file=/src/app/app.component.ts It seems that the type definition is missing for this method, but besides the TypeScript warning it works correctly.

It’s also worth mentioning that this method is a part of private API, so it’s behavior, or even existence might change without any notice.

Thanks Adrian.

If this is a part of a private API and might change without notice, what is a reliable way to collapse nestedRows?

@thethakuri_handsonta

Currently there’s no other way. We have this enhancement request reported in our repository so I hope it will get on our roadmap, as this is popular request. For now I will report the missing type for this method so it can be still used without the warning.