My plunker
In My plunker, if I add some children, then if I delete one of the children, then if I add rows, the rows will be duplicated.
$scope.newSubItem = function(scope) {
var nodeData = scope.$modelValue;
nodeData.items.push({
id: nodeData.id * 10 + nodeData.items.length,
rowId: nodeData.rowId + '.' + (nodeData.items.length + 1),
items: []
});
};
source
share