Selects need to work with a string and icon display

This commit is contained in:
shamoon
2026-07-28 13:19:21 -07:00
parent 9fe8a24757
commit 78e4c716c0
2 changed files with 13 additions and 1 deletions
@@ -35,7 +35,7 @@ import { AbstractInputComponent } from '../abstract-input'
NgxBootstrapIconsModule,
],
})
export class SelectComponent extends AbstractInputComponent<number> {
export class SelectComponent extends AbstractInputComponent<number | string> {
constructor() {
super()
this.addItemRef = this.addItem.bind(this)
@@ -100,6 +100,9 @@ export class SelectComponent extends AbstractInputComponent<number> {
@Input()
bindLabel: string = 'name'
@Input()
iconField: string
public searchFn = (term: string, item: any): boolean =>
matchesSearchText(item?.[this.bindLabel], term)