Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ioantoader opened this issue Dec 30, 2023 · 3 comments · Fixed by #15985 · 4 remaining pull requests
Closed

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

ioantoader opened this issue Dec 30, 2023 · 3 comments · Fixed by #15985 · 4 remaining pull requests
Assignees
Labels
LTS-16-PORTABLE LTS-FIXED-16.9.13 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ioantoader
Copy link

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 ioantoader added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 30, 2023
@julesyan
Copy link

julesyan commented Apr 22, 2024

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

@DanielWojciechowski
Copy link

+1, any updates on this issue?

@hemal-panchasara
Copy link

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

@mehmetcetin01140 mehmetcetin01140 self-assigned this Jul 9, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 9, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.18.4 milestone Jul 9, 2024
cetincakiroglu added a commit that referenced this issue Jul 11, 2024
Fixed #14454 - Listbox | filter is not working if options is bind to …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment