*>>> ***
> > 1. my component : > onClose() > { this.selectedWorkCenterData.forEach(data =>{ > > > this.selectedWorkCenterValue.push(data); > > }) } > on Row Select the data > > *** > > > Blockquote > > ***on selection of rows from prime ng table to populate in multi select > > onRowSelect(event) { > > this.selectedWorkCenterValue = []; > > if (event.data["WORK_CENTER_ID"]) { > > this.selectedWorkCenterData.push(event.data); > > this.searchOnWorkCenters(); > > } my html: <p-multiSelect > > [options]="selectedWorkCenterData" > > maxSelectedLabels="10" > > [(ngModel)]="selectedWorkCenterValue" > > [style]="{ width: '100%' }" > > optionLabel="{{ lookup_config }}" > > defaultLabel="Choose Work Center" > > (onChange)="choosenWorkCenters()" > > #mySelect
Blockquote
>
我必须在我的项目中执行以下操作:从multi select中更改选项时,没有dropdon的更新值。请帮助解决此问题。*
答案 0 :(得分:0)
尝试一下(在每次更改推送中,例如删除);
this.selectedWorkCenterValue = new Array<any>();