In-line add issue
mobiusbpm opened this issue · 4 comments
Hi, I got some problem using the inline add function, when click add, the callback function can be called, but either adding the new added item into the [data]="data" or directly push into this.menuGrid.data.push(menu) (for instance, db-angular-tree-grid #menuGrid), the tree grid will not updated, but got erros below:
TreeBodyComponent.html:93 ERROR TypeError: Cannot read property 'length' of undefined
at Object.eval [as updateDirectives] (TreeBodyComponent.html:100)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:30043)
at checkAndUpdateView (core.js:29439)
at callViewAction (core.js:29680)
at execEmbeddedViewsAction (core.js:29643)
at checkAndUpdateView (core.js:29440)
at callViewAction (core.js:29680)
at execComponentViewsAction (core.js:29622)
at checkAndUpdateView (core.js:29445)
at callViewAction (core.js:29680)
core.js:4002 ERROR TypeError: Cannot read property 'map' of undefined
at SafeSubscriber._next (angular-tree-grid.js:1112)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:192)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:130)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:76)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53)
at Subject.push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next (Subject.js:47)
at AngularTreeGridService.push../node_modules/angular-tree-grid/fesm5/angular-tree-grid.js.AngularTreeGridService.updateDisplayDataObservable (angular-tree-grid.js:25)
at Store.push../node_modules/angular-tree-grid/fesm5/angular-tree-grid.js.Store.setDisplayData (angular-tree-grid.js:422)
at Store.push../node_modules/angular-tree-grid/fesm5/angular-tree-grid.js.Store.setProcessedData (angular-tree-grid.js:401)
at Store.push../node_modules/angular-tree-grid/fesm5/angular-tree-grid.js.Store.processData (angular-tree-grid.js:671)
Could you have a look? Thanks
@mobiusbpm I moved your comment to here.
Hi,
Thanks for your reply. But still got issue for in-line editing. rowAdd($event) does not passed in correct $event argument as the doc said which has "data" and "resolve()" properties, but rowEditSave($event) can pass in correct $event object in which I can call $event.data and $event.resolve(). So in-line edit works, but in-line add not work. Thanks
Thanks for posting this bug. I have pushed a fix. Please use the latest version.
I hope it is fixed.