problem description
<tree-select>[(ngModel)]tree-select
the environmental background of the problems and what methods you have tried
[(ngModel)][(ngModel)]<tree-select>
related codes
<nz-tree-select
[nzDefaultExpandAll]="true"
[nzNodes]="nodes"
[nzPlaceHolder]="please choose"
[(ngModel)]="selectData"
[nzMultiple]="true"
(ngModelChange)="onSelect($event)" name="treeSelect">
</nz-tree-select>
if (changes.selectNodes) {
this.selectData = this.selectNodes;
this.updateSelectStatus(this.nodes, this.selectNodes);
}
public updateSelectStatus(treeData, selectKeys) {
for (const item of treeData) {
item.isSelected = (_.indexOf(selectKeys, item.key) !== -1) ? true : false;
if (item.children.length) {
this.updateSelectStatus(item.children, selectKeys);
}
}
}
what result do you expect? What is the error message actually seen?
[(ngModel)]<tree-select><tree-select>