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

BIG ERROR with DropDown #13996

Closed
ja74687 opened this issue Nov 2, 2023 · 24 comments
Closed

BIG ERROR with DropDown #13996

ja74687 opened this issue Nov 2, 2023 · 24 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ja74687
Copy link

ja74687 commented Nov 2, 2023

Describe the bug

Hello

Team primeng, after the last update your dropdown not work corretly, placeholder not work, control set default value, on your webpage when I click clear I have error:
image

How I can fix it ??

Environment

Drop-down not work corretly, multiselect work fine.

Reproducer

No response

Angular version

16

PrimeNG version

16*

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.14.2

Browser(s)

All

Steps to reproduce the behavior

No response

Expected behavior

No response

@ja74687 ja74687 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 2, 2023
@jsdevtom
Copy link

jsdevtom commented Nov 2, 2023

I can reproduce

@adri95cadiz
Copy link

In my case this seems to be happening in some cases because the old version had the default optionLabel set to "label" and the default optionValue set to "value", and in some cases we just adapted to these default values.

In the new version these default values seem to be omitted and are defaulted to null values, forcing to define the optionLabel and optionValue in every case

image

I solved this by setting optionLabel and optionValue in every p-dropdown and p-multiselect component in my application, hopefully this should work for you too.

@ja74687
Copy link
Author

ja74687 commented Nov 2, 2023

Hey, Its not work in my case, I use dropdown with template. I check and on page PrimeNG error is the same, with dropdown template.

@ja74687
Copy link
Author

ja74687 commented Nov 2, 2023

image
This is set Autstralia default, and when i Click clear I have errors, in my App I have that the same error.

@adri95cadiz
Copy link

Yes anyways I have other errors related to this it could be this case, for example I have a multiselect that is not getting the selected values correctly, a lot of things seem to have changed and it's not clear the steps that should be taken to fix the issues with the new version.

For me, I have had to downgrade primeng to version 16.6.0 as there are a lot of issues that break the application and I have tried to go around them but could only fix while others are still ongoing.

@rosenthalj
Copy link
Contributor

rosenthalj commented Nov 2, 2023

The demo's "Basic" Dropdown example has an obvious error. Please see the annotated screenshot listed below.

Cursor_and_Angular_Dropdown_Component_and_Angular_Dropdown_Component

After attempting to clear (clicking the "x") any of the dropdowns on the demo page, this triggers numerous errors and/or errors in the console log for all the dropdowns on the demo page.

@ja74687
Copy link
Author

ja74687 commented Nov 2, 2023

When i downgrade to 16.0.0 i have similar error, its weird, I use Angular 16 and I can't install Prime 15 xD

@cetincakiroglu
Copy link
Contributor

Hi,

Thanks a lot for reporting the issue, we've just reworked the component logic in multiselect, dropdown, listbox and some of the other input components during the accessibility implementation. Something we do during the accessibility implementation probably causes the issue, it'll be fixed within the next release.

@cetincakiroglu cetincakiroglu 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 Nov 2, 2023
@cetincakiroglu cetincakiroglu self-assigned this Nov 2, 2023
@cetincakiroglu cetincakiroglu added this to the 16.8.0 milestone Nov 2, 2023
@jerkovicl
Copy link

image

selectedOption was also removed from Dropdown without any info in release notes about breaking changes

@ailtonbsj
Copy link

ailtonbsj commented Nov 3, 2023

Hi,

The directive ngModel can't set an item of p-dropdown in version 16.7.0. If I downgrade to 16.6.0 start to work again.

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Nov 3, 2023

Hi,

The directive ngModel can't set an item of p-dropdown in version 16.7.0. If I downgrade to 16.6.0 start to work again.

Could you please open an issue with a reproducer and tag me so we can include it to the 16.8.0 release?

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Nov 3, 2023

image

selectedOption was also removed from Dropdown without any info in release notes about breaking changes

selectedOption wasn't an input or public property and we don't need to state that as a breaking change. Also, it was not mentioned anywhere in the documentation.

@cetincakiroglu
Copy link
Contributor

Hello everyone,

With version 16.7.0, we have released the first part of the accessibility implementation for inputs that we have been working on for a long time. Based on the research we conducted during the implementation, we decided that many components needed changes in their structure and simplification, and these components were rewritten. Unfortunately, after extensive testing, there may be unexpected and unforeseen bugs that have emerged. We are grateful for your reports, and we are working to address them in the upcoming release!

@jerkovicl
Copy link

image
selectedOption was also removed from Dropdown without any info in release notes about breaking changes

selectedOption wasn't an input or public property and we don't need to state that as a breaking change. Also, it was not mentioned anywhere in the documentation.

if it wasnt public i would not be able to use it, but nvm, more important question if this is coming back or not, so i know how to rewrite existing code

@rosenthalj
Copy link
Contributor

rosenthalj commented Nov 3, 2023 via email

@cetincakiroglu
Copy link
Contributor

image
selectedOption was also removed from Dropdown without any info in release notes about breaking changes

selectedOption wasn't an input or public property and we don't need to state that as a breaking change. Also, it was not mentioned anywhere in the documentation.

if it wasnt public i would not be able to use it, but nvm, more important question if this is coming back or not, so i know how to rewrite existing code

It's not coming back use modelValue signal instead

@cetincakiroglu
Copy link
Contributor

After your fix for the dropdown, Is there a chance you could produce a release candidate version?

Planned release date is November 8th

@ja74687
Copy link
Author

ja74687 commented Nov 3, 2023

Hi,
The directive ngModel can't set an item of p-dropdown in version 16.7.0. If I downgrade to 16.6.0 start to work again.

Could you please open an issue with a reproducer and tag me so we can include it to the 16.8.0 release?

I find misake in my package.json I use ^ symbol and node install 16.7 Prime not 16.6 :)

@ailtonbsj
Copy link

I find misake in my package.json I use ^ symbol and node install 16.7 Prime not 16.6 :)

I had the same problem. I used ~ instead of ^.

@ailtonbsj
Copy link

Hi,
The directive ngModel can't set an item of p-dropdown in version 16.7.0. If I downgrade to 16.6.0 start to work again.

Could you please open an issue with a reproducer and tag me so we can include it to the 16.8.0 release?

I just opened an issue in #14023

@pierocox09
Copy link

cuando estan juntas la optionlabel y optionvalue causa un error hasta en su documentacion

@ailtonbsj
Copy link

cuando estan juntas la optionlabel y optionvalue causa un error hasta en su documentacion

Actualice su versión a 16.7.1

@pierocox09
Copy link

cuando estan juntas la optionlabel y optionvalue causa un error hasta en su documentacion

Actualice su versión a 16.7.1

da un error al mostrar el valor

@ailtonbsj
Copy link

Actualice su versión a 16.7.1

da un error al mostrar el valor

Open an issue with a reproducer on Stackblitz.

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

No branches or pull requests

8 participants