handsontable / ngHandsontable

Official AngularJS directive for Handsontable
http://handsontable.github.io/ngHandsontable/
MIT License
433 stars 159 forks source link

Error: Cannot set property 'isHotTableEnv' of undefined #269

Open minalkumar2893 opened 4 years ago

minalkumar2893 commented 4 years ago

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

AMBudnik commented 4 years ago

Hi @minalkumar2893

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

minalkumar2893 commented 4 years ago

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

AMBudnik commented 4 years ago

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

minalkumar2893 commented 3 years ago

@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?

AMBudnik commented 3 years ago

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.

minalkumar2893 commented 3 years ago

@AMBudnik any updates?

AMBudnik commented 3 years ago

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.

elquimeras commented 3 years ago

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

minalkumar2893 commented 3 years ago

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 commented 3 years ago

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

AMBudnik commented 3 years ago

Hi @minalkumar2893 could you send me your requirements on mail support@handsontable.com? I'll do my best to help.