diff --git a/src-ui/src/app/components/common/input/select/select.component.html b/src-ui/src/app/components/common/input/select/select.component.html index 5572ad33d..ee0e8695a 100644 --- a/src-ui/src/app/components/common/input/select/select.component.html +++ b/src-ui/src/app/components/common/input/select/select.component.html @@ -36,7 +36,16 @@ (focus)="clearLastSearchTerm()" (clear)="clearLastSearchTerm()" (blur)="onBlur()"> + + @if (iconField && item[iconField]) { + + } + {{item[bindLabel]}} + + @if (iconField && item[iconField]) { + + } {{item[bindLabel]}} diff --git a/src-ui/src/app/components/common/input/select/select.component.ts b/src-ui/src/app/components/common/input/select/select.component.ts index 4eb1395a2..888d3b5ed 100644 --- a/src-ui/src/app/components/common/input/select/select.component.ts +++ b/src-ui/src/app/components/common/input/select/select.component.ts @@ -35,7 +35,7 @@ import { AbstractInputComponent } from '../abstract-input' NgxBootstrapIconsModule, ], }) -export class SelectComponent extends AbstractInputComponent { +export class SelectComponent extends AbstractInputComponent { constructor() { super() this.addItemRef = this.addItem.bind(this) @@ -100,6 +100,9 @@ export class SelectComponent extends AbstractInputComponent { @Input() bindLabel: string = 'name' + @Input() + iconField: string + public searchFn = (term: string, item: any): boolean => matchesSearchText(item?.[this.bindLabel], term)