primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Tree table is not updating the new changes

Open MalliswariKP opened this issue 8 years ago • 1 comments

i have done expandAll for the tree nodes

toggleNodeExpandState(node, isExpand, isForAllNodes) { node.expanded = isExpand; if (node.children && isForAllNodes) { node.children.forEach((childNode) => { this.toggleNodeExpandState(childNode, isExpand, isForAllNodes); }); } }

HTML : <p-treeTable #calTreeTable class="calibrationTreeTable" *ngIf="cVariableTree && cVariableTree.length>0" [value]="cVariableTree" selectionMode="multiple" [(selection)]="selectedNodes" [(contextMenuSelection)]="contextMenuNode" [contextMenu]="isEditable?cm:null" (dblclick)="editRows()" (onContextMenuSelect)="buildContextMenus($event)">

the expanded state is update in this.cVariableTree but its not refreshing/updating the tree. this.cVariableTree = [...this.cVariableTree];

when i add above line, it is refreshing. This is workaround but i would like to know the actual reason.

MalliswariKP avatar Jul 24 '18 08:07 MalliswariKP

Please see the change detection section at the documentation.

cagataycivici avatar Jul 26 '18 07:07 cagataycivici