This is my code when list is change.
Code: Select all
@ViewChild('table', {static: true}) private _table;
Code: Select all
this.listservice.getConfiguration(this.param)
.subscribe(result => {
result.data.forEach((element, index) => {
resultData.push({id : index, element, ...element});
});
this._table.closeCellEdit(); // this is the funcion close cell
this.title = result.config.description;
this.cols = result.config.cols;
this.rows = resultData;
this.selectedColumns = this.cols;
this.numberElements = this.rows.length;
this.optionsTypecontrol(this.cols);
this.clonedRow = {};
});
Code: Select all
ERROR TypeError: this._table.closeCellEdit is not a function
at SafeSubscriber._next (list.component.ts:98)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
at SafeSubscriber.next (Subscriber.js:122)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at MergeMapSubscriber.notifyNext (mergeMap.js:69)
at InnerSubscriber._next (InnerSubscriber.js:11)
at InnerSubscriber.next (Subscriber.js:49)
at Observable._subscribe (subscribeToArray.js:3)
at Observable._trySubscribe (Observable.js:42)