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: Dropdown Selected option not shown while typing in filter if it has value null, while having selectedItem template #14815

Closed
Draganlazarev90 opened this issue Feb 15, 2024 · 1 comment · Fixed by #14821
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Draganlazarev90
Copy link

Draganlazarev90 commented Feb 15, 2024

Describe the bug

Selected option that has value null is not shown while typing in filter input, and if you have selectedItem template

Environment

Primeng 17.7

Reproducer

https://stackblitz.com/edit/h1xfk1?file=src%2Fapp%2Fdemo%2Fdropdown-reactive-forms-demo.ts,src%2Fapp%2Fdemo%2Fdropdown-reactive-forms-demo.html

Angular version

17.0.5

PrimeNG version

17.7

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a dropdown with filter, a selectedItem template and an option that has value null
  2. Select option with value null
  3. Type something in the filter input

Expected behavior

Show the selected option instead of the placeholder

@Draganlazarev90 Draganlazarev90 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 15, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Feb 15, 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 15, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.8.0 milestone Feb 15, 2024
mehmetcetin01140 added a commit that referenced this issue Feb 15, 2024
…ilter if it has value null, while having selectedItem template
@capc0
Copy link
Contributor

capc0 commented Feb 15, 2024

could this be related, since it also only occures when a selectedItem template is used #14809?

cetincakiroglu added a commit that referenced this issue Feb 23, 2024
Fixed #14815 - improved logic when modelValue is null and selected option value  is null
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
3 participants