handsontable / handsontable

JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
https://handsontable.com
Other
19.15k stars 2.94k forks source link

[Bug]: Property 'prototype' does not exist on type 'BaseEditor' #10934

Closed engineerscodes closed 3 weeks ago

engineerscodes commented 3 weeks ago

Describe the bug

Good morning, I am facing an issues with Handson table with Angular Typescript

const CustomEditor = Handsontable.editors.BaseEditor.prototype.extend(); CustomEditor.prototype.beginEditing = function() {};

Going through more I found this. Argument of type 'BaseEditor' is not assignable to parameter of type 'typeof BaseEditor'. Property 'prototype' is missing in type 'BaseEditor' but required in type 'typeof BaseEditor'.ts(2345)

Video/Screenshots

image image

Provide a link to the demo with the bug reproduction

No response

Handsontable version

12.4.0

Framework version

Angular Version : 15

Your environment

Windows 11

engineerscodes commented 3 weeks ago

I am following this guide, Seem issues with types https://handsontable.com/docs/javascript-data-grid/cell-editor/?_gl=1%2a173vopz%2a_gcl_au%2aMTE1NDgxMDM4Ni4xNzA2ODA1NDg1%2a_ga%2aMTM2MTIyNjc2OS4xNzA2ODA1NDg1%2a_ga_6QC4G87MXN%2aMTcxMzYyMTM1MS41LjEuMTcxMzYyMjczMy40MC4wLjA.&_ga=2.206338899.1796657896.1713621351-1361226769.1706805485

adrianszymanski89 commented 3 weeks ago

Hi @engineerscodes

Thank you for contacting us. Do you have a code example of your whole editor implementation? I checked the snippet you sent with our guide, and it would be easier to determine the issue with a demo.

engineerscodes commented 3 weeks ago

This not the extract one :https://github.com/engineerscodes/HTdemo/blob/master/src/app/ht/ht.component.ts

adrianszymanski89 commented 3 weeks ago

Hi @engineerscodes

The approach of creating a custom editor recommended by us in the documentation is presented here: https://handsontable.com/docs/javascript-data-grid/angular-custom-editor-example/

However, I'll consult your approach with the team and update you then.

engineerscodes commented 3 weeks ago

Thanks @adrianszymanski89

adrianszymanski89 commented 3 weeks ago

Hi @engineerscodes

I have the update from the team. Unfortunately, your approach will not work with our current architecture, and we recommend doing it the way we showed in the example in the documentation.

engineerscodes commented 3 weeks ago

Thanks very much