ngHandsontable icon indicating copy to clipboard operation
ngHandsontable copied to clipboard

Error: Cannot set property 'isHotTableEnv' of undefined

Open minalkumar2893 opened this issue 5 years ago • 11 comments

After upgrading to latest version. When right clicking on the grid to show the context menu, i am getting this error: image

minalkumar2893 avatar Oct 01 '20 13:10 minalkumar2893

Hi @minalkumar2893

Can you share a demo where this issue can be replicable?

AMBudnik avatar Oct 02 '20 11:10 AMBudnik

replicated the issue in this fiddle: https://jsfiddle.net/minalkumar2893/zsythx64/20/

minalkumar2893 avatar Oct 05 '20 06:10 minalkumar2893

Thank you for sharing the demo.

I have replicated the issue using Handsontable 8.0.0 and wrapper version 0.13.2, but also while loading minimal settings https://jsfiddle.net/r6gm2zfo/1/ using Handsontable v 2.0.0 and wrapper v 0.13.0

AMBudnik avatar Oct 05 '20 11:10 AMBudnik

@AMBudnik We did some research on this issue, and we discovered that this property 'isHotTableEnv' is removed from version 8.0.0 onwards. Does it mean we should remove the same from ngHandsontable? We are not sure of the implications. or was this property renamed after version 8.0.0? is there something which we can do to help resolve the issue?

minalkumar2893 avatar Oct 19 '20 12:10 minalkumar2893

You're right @minalkumar2893 this PR describes that the isHotTableEnv is removed https://github.com/handsontable/handsontable/pull/6625 I will confirm and come back to you.

AMBudnik avatar Oct 19 '20 13:10 AMBudnik

@AMBudnik any updates?

minalkumar2893 avatar Oct 26 '20 13:10 minalkumar2893

I am sorry but there are no ngHandsontable tasks for the upcoming roadmap. Nevertheless, I keep this ticket open in my system so I will inform you as soon as I get any update.

AMBudnik avatar Oct 27 '20 13:10 AMBudnik

With the last update of library the hansontable lost scope when is used behind a ng-if, my solution was use a ng-show, maybe set a custom context to your grid api can solve the problem too if the first solution is not enought in your case.

Post your code to take a look around

elquimeras avatar Nov 03 '20 18:11 elquimeras

This is how we use the nghandsontable directive: We have a questionnaire with different response types, out of them one is table. We use the nghandsontable directive inside another custom directive for the table response type. and we include this directive only if there is a question with table response type. In our earlier code we had an ng-if inside custom directive, but even after removing it, i get the same error.

minalkumar2893 avatar Nov 19 '20 16:11 minalkumar2893

@elquimeras How do i set a custom context to my grid api?

minalkumar2893 avatar Nov 19 '20 17:11 minalkumar2893

Hi @minalkumar2893 could you send me your requirements on mail [email protected]? I'll do my best to help.

AMBudnik avatar Nov 23 '20 14:11 AMBudnik