Demo Walkthrough Deleting Rows

Deleting Rows

Last, of course, is the ability to delete rows. Delete is implemented for Departments and DepartmentChildren and is triggered by the "Delete" button in the tree.component.html template. This calls the deleteNode method in the tree.component.ts which calls down into the deleteNode() method of the TreeComponentService which calls the delete() method on the node.

That's all you have to do to delete a node. All the real work is handled by SmartNgRX and your EffectService.

In order to access the delete() method of the RowProxy we declare the row as implementing the RowProxyDelete interface in our CommonSourceNode interface. If you use SmartNgRX, the row you are working with implements the RowProxyDelete interface.