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 is not displaying correctly. #14753

Closed
D-Studio-21th opened this issue Feb 7, 2024 · 2 comments
Closed

Comments

@D-Studio-21th
Copy link

Describe the bug

On selecting a value for the first time, the selected value is not displayed on UI. In subsequent selections, the previously selected value is being displayed.

293031469-8e57de98-0907-4cc5-9864-3a83aee96ed0

293031470-6f7576ba-6726-466e-a74f-dfb17340f8b6

Environment

Any

Reproducer

No response

Angular version

any

PrimeNG version

older 16.4.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

any

Browser(s)

any

Steps to reproduce the behavior

  1. Open https://stackblitz.com/edit/adtdqm?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.html
  2. Open console log
  3. Select any option in drop-down

Expected behavior

No response

@D-Studio-21th D-Studio-21th 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 7, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Feb 8, 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 8, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.7.0 milestone Feb 8, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Try to receive updated value from the event itself, onChange event emits the updated value. Component updates selectedOption afterward. selectedOption is a variable that we use within the component.

@cetincakiroglu cetincakiroglu removed the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 14, 2024
@cetincakiroglu cetincakiroglu removed this from the 17.7.0 milestone Feb 14, 2024
@D-Studio-21th
Copy link
Author

Hello, I need selectedOption because of value dont show all data. How can I get data from [{label: 'test', value: "test", data: ["some data"]}] e.g. Its working in primeng <= 16.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants