primeng
primeng copied to clipboard
listbox filter is not working if options is bind to a string array
Describe the bug
I have a listbox like
<p-listbox [filter]="true" [multiple]="true" [checkbox]="true"
[metaKeySelection]="false" [(ngModel)]="filterConstraint.value" [options]="c?.filterOptions??[]"
class="time-series-filter-listbox"></p-listbox>
where public filterOptions: string[] | undefined; not an array of objects label, value, In this case when I enter a value in the filter always the list is empty
Environment
windows
Reproducer
No response
Angular version
17.0.8
PrimeNG version
17.03
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.10
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
I am encountering the same problem. I have made a stackblitz for it here: https://stackblitz.com/edit/gjuaa6?file=src%2Fapp%2Fdemo%2Flistbox-filter-demo.html
Have yet to figure out a workaround that isnt just using the label, value format
+1, any updates on this issue?
I am facing the same issue with p-listbox. primeng version 16 and angular version 17