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

Tree: Impossible to get tree node's element (data-id attribute absent) #15020

Closed
kheos31 opened this issue Mar 12, 2024 · 5 comments · Fixed by #15021
Closed

Tree: Impossible to get tree node's element (data-id attribute absent) #15020

kheos31 opened this issue Mar 12, 2024 · 5 comments · Fixed by #15021
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@kheos31
Copy link
Contributor

kheos31 commented Mar 12, 2024

Describe the bug

Hello PrimeNG team,

Tree component lost its attribute data-id on each tree node element. It's really embarassing because we cannot tell to a third party library that it have to be plugged on a given node's HTML element... (like popover, etc...)
This attribute was lost here : 12d79f7

An existing issue corresponding to this bug was closed by error (I suppose, because this bug is still present in code) : #14541

A PR was also opened by @adyeardley to correct this issue : #14552

Also, your function focusVirtualNode (

focusVirtualNode() {
) can't works with this data-id attribute missing. Impact on expand and collapse functions as I could see.

Can you please reopen this little PR and merge it please? Or just add again this attribute on node's element.

Thanks in advance and have a nice day.

Environment

Angular 17 application

Reproducer

No response

Angular version

17.2.2

PrimeNG version

17.10.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.1

Browser(s)

Chrome 122

Steps to reproduce the behavior

  1. Go to https://primeng.org/tree
  2. Check that each code examples have a "key" attribute in its node data
  3. Check on the page, no data-id attribute is present

image

Expected behavior

Each node's element have to got a data-id attribute corresponding to its key property.

@kheos31 kheos31 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 12, 2024
kheos31 added a commit to kheos31/primeng that referenced this issue Mar 12, 2024
@kheos31
Copy link
Contributor Author

kheos31 commented Mar 12, 2024

PR opened with the lost attribute #15021

@adyeardley
Copy link

adyeardley commented Mar 13, 2024

Thanks for this! I can confirm it is still causing problems for us and we have been unable to migrate to Prime v17, as it breaks a lot of our Automation tests, which is very important to the stability of our application.

@luke6040
Copy link

luke6040 commented Mar 13, 2024

Yep same for me, we are pretty stuck until this is fixed. Just so there is no confusion again, it was closed because a fix was coming in vue, but we don't use that so wont help :(

Prime

@cetincakiroglu cetincakiroglu added this to the 17.11.0 milestone Mar 14, 2024
@cetincakiroglu cetincakiroglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 14, 2024
@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Mar 14, 2024

Fixed in #15021 until the PassThrough arrives. You'll be able to pass any attribute you want with PassThrough which is in implementation progress right now.

@cetincakiroglu cetincakiroglu modified the milestones: 17.11.0, 17.12.0 Mar 14, 2024
@cetincakiroglu
Copy link
Contributor

This issue is fixed in 17.11.0, closing the issue and update the milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants