handsontable icon indicating copy to clipboard operation
handsontable copied to clipboard

The `this.instance` is `undefined` in custom editor

Open gtoniolo opened this issue 2 years ago • 3 comments

Describe the bug

I updated to version 14, but my custom editors seem to no longer work.

https://handsontable.com/docs/javascript-data-grid/cell-editor/

this.instance seems to be 'undefined'. Is it become this.hot ?

I don't find any information in the release notes and migration guide.

Video/Screenshots

No response

Provide a link to the demo with the bug reproduction

No response

Handsontable version

14.0.0

Framework version

No response

Your environment

Macos and chrome

gtoniolo avatar Dec 04 '23 10:12 gtoniolo

Hi @gtoniolo

Thank you for pointing that one out. We forgot to place the details about the removal of this.instance in the migration guide.

In general, that was deprecated as this itself is an instance. You can test it here https://jsfiddle.net/sLqn9vat/2/

AMBudnik avatar Dec 04 '23 10:12 AMBudnik

Hi @AMBudnik - I am a bit confused - since the editor itself is a class, isn't "this" in the editor context a reference to the editor as opposed to the Handsontable? this.instance was previously the reference to Handsontable

bbogovich-sap avatar Jan 09 '24 18:01 bbogovich-sap

Hi @bbogovich-sap

I'll be replying to your email later today (I'm waiting for my colleague's feedback), but let me answer here as well. You're right. I should have say yes to this question

this.instance seems to be 'undefined'. Is it become this.hot ?

this.instance is now this.hot.

AMBudnik avatar Jan 10 '24 11:01 AMBudnik