primeng icon indicating copy to clipboard operation
primeng copied to clipboard

listbox filter is not working if options is bind to a string array

Open ioantoader opened this issue 1 year ago • 3 comments

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

ioantoader avatar Dec 30 '23 10:12 ioantoader

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

julesyan avatar Apr 22 '24 20:04 julesyan

+1, any updates on this issue?

DanielWojciechowski avatar May 06 '24 12:05 DanielWojciechowski

I am facing the same issue with p-listbox. primeng version 16 and angular version 17

hemal-panchasara avatar Jun 25 '24 06:06 hemal-panchasara