I’m looking at the custom-editor override example here:
https://handsontable.com/docs/6.2.2/frameworks-wrapper-for-react-custom-editor-example.html
This example shows override the TextEditor
.
What I’d like to do is completely control the editor with my own component. I’ve figured out from the example how to ram my own component React in there (essentially render within this.TEXTAREA_PARENT
) like so:
export class CustomEditor extends editors.TextEditor {
constructor(props) {
super(props);
}
createElements() {
super.createElements();
const cell = this.getEditedCell() as HTMLElement;
const el = <div>My Editor</div>;
ReactDOM.render(el, this.TEXTAREA_PARENT);
}
}
However this feels like I’m hacking the TextEditor in a way it’s not designed, and that there’s probably a lower-level component I should really be extending to do this properly.
For instance, it’s not clear how I report back to the grid what the resulting edited value is when editing is complete. Or, in fact, how I signal to the grid that editing is complete.
What’s the “right™” way to do this? Thanks!!