TypeError: undefined is not an object (evaluating 'this.dataKeys.reduce')
Closed this issue · 1 comments
lrochas commented
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?
lrochas commented
Fresh install resolved the issue. Forget!
Thanks for sharing your code.