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

p-treeTableHeaderCheckbox doesn't select/unselect all when TreeTable has dataKey property #9188

Closed
kingmakeryao opened this issue Aug 24, 2020 · 5 comments · Fixed by #15217
Assignees
Labels
LTS-PORTABLE PRO Support Issue was reported by PRO User Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@kingmakeryao
Copy link

I'm submitting a ... (check one with "x")

[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/primeng-treetableselection-demo-vbfsum

Current behavior
The top select-all checkbox doesn't work if p-treeTable dataKey property is used (e.g. <p-treeTable dataKey="name").
The root nodes are not selected and nothing happens if I click the second time. Only child nodes are selected

Expected behavior
Click the top select-all checkbox should select or unselect all the nodes.

Minimal reproduction of the problem with instructions
Just use "dataKey" property for the p-treeTable and try to use p-treeTableHeaderCheckbox

  • Angular version: 9.X

  • PrimeNG version: 9.X

  • Browser: [all | Chrome 84 | Firefox 79 | IE Edge]

@kingmakeryao
Copy link
Author

kingmakeryao commented Aug 24, 2020

This issue was mentioned in #7511 but it was closed. I'm still able to replicate it by using the current treetable demo. This seems to be minor and known because it simply works when there is no 'dataKey' and it is the only mode that doesn't use 'dataKey' property in the treetable selection demo. However, I hope it could be consistent among different modes and let dataKey serve itself.

Also a note here, I'm also able to replicate it with Angular 10 and PrimeNG 10.0.0-rc3.

Please let me know if anything else is needed. It's my first time opening a ticket here.

@yigitfindikli yigitfindikli self-assigned this Nov 24, 2020
@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 24, 2020
@MrBogue
Copy link

MrBogue commented Jan 6, 2021

p-treeTableHeaderCheckbox doesn't select/unselect all when TreeTable has dataKey property

+1 issue
not able to select/unselect all when TreeTable has dataKey property

Please advise when will be the next fix..

@cetincakiroglu
Copy link
Contributor

Hi,

If the issue still exists with the latest PrimeNG version, please provide a StackBlitz example by using PrimeNG Issue Template and re-open the issue.

Regards

@cetincakiroglu cetincakiroglu removed the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 28, 2022
@andrerauer
Copy link

Hi,

the issue still exists. Here the StackBlitz example:

https://stackblitz.com/edit/github-bcnczx?file=src/app/app.component.html

If you remove the dataKey-Attribute, the select-all toggle works.

@ABiBE
Copy link

ABiBE commented Sep 22, 2023

Hi @cetincakiroglu.
I have the same problem. Here last exemple fork with latest Prime and Angular versions :
https://stackblitz.com/edit/github-bcnczx-uak4ao?file=src%2Fapp%2Fapp.component.html

@cetincakiroglu cetincakiroglu added this to the 17.13.0 milestone Mar 25, 2024
@cetincakiroglu cetincakiroglu self-assigned this Mar 25, 2024
@github-actions github-actions bot 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 25, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working PRO Support Issue was reported by PRO User LTS-PORTABLE 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 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE PRO Support Issue was reported by PRO User Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants