irossimoline/angular4-material-table

TypeError: undefined is not an object (evaluating 'this.dataKeys.reduce')

Closed this issue · 1 comments

Hi!
In the TableDataSource class / createNewObject function I get this error when I try to create a new element: ERROR - TypeError: undefined is not an object (evaluating 'this.dataKeys.reduce') wether by invoking (click)="dataSource.createNew()" in the view or when calling's the this.dataSource.createNew();function in the component. I'm not trying to innovate for the moment. Just trying to import StackBlitz's code in my app.

When I do a console.log(this.dataConstructor);and a console.log(this.dataKeys);inside the createNewObject()function both are undefined.

Any idea on how to solve this?

Fresh install resolved the issue. Forget!
Thanks for sharing your code.