我有一個 ColumnDef: relatedToolsColumns: ColumnDef[] = [ { field: 'toolId', name: 'Tool Number', type: 'dropdown', optionsList: this.tools, optionsListField: 'id', optionsListName: 'toolNo', width: '70%' }, { field: 'delete', name: 'Delete', type: 'icon-button', width: '30%', sortingDisabled: true, icon: 'delete', callback: this.deleteRelatedTool.bind(this) }];我正在使用端點調用“getGageNoList”訂閱這些工具: ngOnInit() { this.tool = this.data.tool; this.readonly = this.data.readonly; this.tprecmApiService.getGageNoList() .subscribe((val) => { this.tools = val; this.relatedToolsColumns .find((column: ColumnDef) => column.field === 'toolId') .optionsList = this.tools; }); }這就是我所擁有的工具: 工具數組這就是我在工具顯示的 UI 中所擁有的,當前從下拉列表中選擇了兩個相同的工具編號。 UI 添加工具顯示The Dropdown list of tools: 網格中工具的下拉列表我需要將這些下拉列表過濾為僅那些尚未顯示在網格上的下拉列表。
從下拉列表中過濾重復值
偶然的你
2022-12-29 16:16:46