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

Filter is not working in ListBox Component and Dropdown Component with SelectItem type #15864

Closed
AlbaSS18 opened this issue Jun 19, 2024 · 4 comments
Assignees
Labels
Resolution: Wontfix Issue will not be fixed due to technical limitations

Comments

@AlbaSS18
Copy link

Describe the bug

When options are SelectItem type, filter is not working in ListBox and Dropdown Component.

Listbox options:
imagen

Filter options:
imagen

Environment

Ubuntu 20.04.6 LTS

Reproducer

https://stackblitz.com/edit/j5s22b?file=src%2Fapp%2Flistbox-filter-demo.html

Angular version

17.3.11 or 18.0.1

PrimeNG version

17.18.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.13.0

Browser(s)

Firefox 126

Steps to reproduce the behavior

No response

Expected behavior

No response

@AlbaSS18 AlbaSS18 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 19, 2024
@quartelh
Copy link

Same observation in my code using ListBox with filter and SelectItem array as options

[email protected]

@angular/[email protected]
[email protected]

@cetincakiroglu cetincakiroglu added this to the 17.18.4 milestone Jul 3, 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 3, 2024
@mehmetcetin01140 mehmetcetin01140 modified the milestones: 17.18.4, 17.18.3 Jul 3, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jul 3, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

SelectItem type is not related to the listbox component's internal logic. To use filter functionality, you should provide a filterField or optionLabel property.

I am closing the issue since it's not a bug.

@cetincakiroglu cetincakiroglu added Resolution: Wontfix Issue will not be fixed due to technical limitations and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Jul 4, 2024
@cetincakiroglu cetincakiroglu removed this from the 17.18.3 milestone Jul 4, 2024
@AlbaSS18
Copy link
Author

AlbaSS18 commented Jul 4, 2024

Okey, thank you. In previous versions, filterField or optionLabel property with SelectItem was not necessary, so I don't understand because now it is necessary.

@quartelh
Copy link

I am confused.
The behaviour for Dropdown is different than for ListBox.

See https://stackblitz.com/edit/j5s22b-iaamnd.

For Dropdown it just works and there is no need for filterFields or optionLabel property for the filter to just work with SelectItem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Wontfix Issue will not be fixed due to technical limitations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants