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

Component: p-dropdown filterValue initial value is ignored and binding not working #14586

Closed
dnordahl1 opened this issue Jan 18, 2024 · 0 comments · Fixed by #14804
Closed

Component: p-dropdown filterValue initial value is ignored and binding not working #14586

dnordahl1 opened this issue Jan 18, 2024 · 0 comments · Fixed by #14804
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dnordahl1
Copy link

dnordahl1 commented Jan 18, 2024

Describe the bug

I've tried a number of different things with changeDetection and binding types, but:

  1. Any initial value set for filterValue is ignored
  2. Changes manually entered in the dropdown filter are not updated to the variable bound to filterValue

In my actual application, I'm trying to do something similar to the example. If a user has a stateCode populated in an address field. I want to filter the objects shown in a separate dropdown by their stateCode attribute (if they have one populated).

Environment

n/a

Reproducer

https://stackblitz.com/edit/gjdsxh-fd12qg

Angular version

17.1.0

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Set value of p-dropdown filterValue to a variable or string literal during component initialization in the typescript or the html
  2. Open dropdown and see that the value set is not populated in the filter input
  3. Manually enter value in the filter input and see that the value entered is never updated to the variable bound to filterValue

Expected behavior

  1. If a value is set for filterValue, when the drop down is opened, it should default to this value
  2. When a user enters a value in the drop down filter input, the changes entered should be reflected in the bound variable.
@dnordahl1 dnordahl1 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 18, 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 Feb 14, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Feb 14, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.7.0 milestone Feb 14, 2024
cetincakiroglu added a commit that referenced this issue Feb 14, 2024
Fixed #14586 - Dropdown | filterValue initial value is ignored and bi…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants