none of function is not working in onchange() in Angular
hi, I am trying to use function in onchange() but it is not working in angular and i try to do this one https://jsfiddle.net/tsepakkwan/djm03fua/2/ but in angular i m not able to to add any function inside onchange() it is showing error that setData is not a funtion
https://codesandbox.io/s/twilight-hooks-moq79
export class AppComponent {
@ViewChild("spreadsheet") spreadsheet: ElementRef;
@ViewChild("button") button: ElementRef;
title = "an";
ngAfterViewInit() {
var t = jexcel(this.spreadsheet.nativeElement, {
minDimensions: [40, 10],
onchange: function (element, cell, x, y, value, oldValue) {
alert(value);
}
});
this.button.nativeElement.onclick = function () {
t.insertRow();
};
}
}
no this is not i m asking onchange(instance, cell, x, y, value,cellName) { console.log(instance.prop=cell); console.log(instance); console.log(cell); console.log(x); console.log(y);
console.log(value);
console.log(cellName);
this.table.hideRow(1);
console.log('New change on cell ' + jexcel.getColumnNameFromId([4, y]) + ' to: ' + value + '');
} this is my code and when i m using hideRow() it show me error
i want to do is : when i update or change any cell value then in the same row last cell value will automatically change from 0 to 1