Fix select search input

This commit is contained in:
Chocobozzz 2025-02-11 15:51:31 +01:00
parent ac0bf90758
commit 306257686c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 2 deletions

View File

@ -67,8 +67,11 @@ export class SelectOptionsComponent implements AfterContentInit, ControlValueAcc
// Allow plugins to update our value
@HostListener('change', [ '$event.target' ])
handleChange (event: any) {
this.writeValue(event.value)
handleChange (target: HTMLInputElement) {
// Prevent the primeng search input to out value
if (target.role === 'searchbox') return
this.writeValue(target.value)
this.onModelChange()
}