-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
p-dropdown and p-multiselect: generated HTML has duplicate id #14284
Comments
I can only confirm this issue affects ui test automation based on assumption that id attributes are unique in the DOM. Would be nice if we had it fixed |
+1 |
I found a workaround, I use property binding for id and it generates only one element with such id. |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
I've just verified with primeng 17.18.12 and the original problem still occurs as reported. I don't think I can reopen the issue (I probably don't have the right permissions) |
Describe the bug
A p-dropdown or p-multiselect component with an id (
<p-dropdown id="some-id">
) results in duplicate ids. The p-dropdown element will get a div inside it with the same id as the p-dropdown element.The same effect occurs on p-multiselect
Environment
Any
Reproducer
https://stackblitz.com/edit/github-q5rtf2?file=src%2Fapp%2Fapp.component.html
Angular version
16.2.12
PrimeNG version
16.9.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.2
Browser(s)
No response
Steps to reproduce the behavior
Create any p-dropdown or p-multiselect and assign it an id
Expected behavior
There are no duplicate IDs
The text was updated successfully, but these errors were encountered: