primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TreeTable Loading SelectionKeys asynchronously

Open gregorAutomatics opened this issue 1 year ago • 1 comments

Describe the bug

When selectionKeys are loaded asynchronously, e.g. via http-request, the checkboxes aren't updating as expected

Pull Request Link

No response

Reason for not contributing a PR

  • [x] Lack of time
  • [x] Unsure how to implement the fix/feature
  • [x] Difficulty understanding the codebase
  • [ ] Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/cgfxoxn2-tkjwayeg?file=src%2Fapp%2Ftree-table-selection-checkbox-demo.ts,src%2Fservice%2Fnodeservice.ts,src%2Fapp%2Ftree-table-selection-checkbox-demo.html

Environment

Any environment

Angular version

18.x.x

PrimeNG version

v17 (LTS Only)

Node version

20

Browser(s)

No response

Steps to reproduce the behavior

When selectionKeys are loaded asynchronously, e.g. via http-request, in stackblitz setTimout, the checkboxes aren't updating as expected:

Image

Image

When triggering some internal ChangeDetection via selecting or expanding another node, the checkboxes will be selected.

Using a Signal doesn't help either.

Expected behavior

The checkboxes reflect the state of the selectionKeys object immediatly when it changes.

gregorAutomatics avatar Feb 12 '25 17:02 gregorAutomatics

This issue has been automatically marked as stale due to a lack of activity. If this issue is still relevant to you, please leave a comment so we can keep it open. We apologize for not being able to prioritize it sooner. If you have any new information or questions, please share them in your comment!

github-actions[bot] avatar Oct 16 '25 00:10 github-actions[bot]