class CustomEditor extends Handsontable.editors.AutocompleteEditor {
setValue(newValue) {
this.TEXTAREA.value = !newValue ? 'DD/MM/YYYY' : newValue;
}
getValue() {
return this.TEXTAREA.value.replace('DD/MM/YYYY', '');
}
focus() {
super.focus()
this.TEXTAREA.select()
}
open() {
Handsontable.editors.BaseEditor.prototype.open.apply(this, arguments)
}
}
class DataGrid extends React.Component {
constructor(props) {
super(props);
this.saveStatus= {}
this.handsontableData = [[''],[''], ['']]
}
render() {
const {classes} = this.props
return (
<div id="hot-app">
<HotTable root="hot"
data={this.handsontableData}
colHeaders={true}
rowHeaders={true}
editor={CustomEditor}
columns = {[{editor: CustomEditor, source: ['BMW', 'Chrysler', 'Nissan', 'Suzuki', 'Toyota', 'Volvo']}]}
/>
</div>
);
}
}
export default withStyles(styles)(DataGrid);
The above code results in following error: