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

Pinning aggregation rows then ungrouping causes a hard error #5822

Open
2 tasks done
Mike-Dax opened this issue Dec 3, 2024 · 0 comments
Open
2 tasks done

Pinning aggregation rows then ungrouping causes a hard error #5822

Mike-Dax opened this issue Dec 3, 2024 · 0 comments

Comments

@Mike-Dax
Copy link

Mike-Dax commented Dec 3, 2024

TanStack Table version

8.20.5

Framework/Library version

React 17.0.2

Describe the bug and the steps to reproduce it

This reproduction is a combination of the pinning and grouping example sandboxes.

  1. Group some rows, eg 'last names' by clicking ✋.
  2. Pin a grouped aggregation row by clicking ⬆️ or ⬇️.
  3. Ungroup the rows by clicking ✊.

In this code:

https://github.com/TanStack/table/blob/6b4d616dd7c8917616eb4fecaf09dda7030fd115/packages/table-core/src/features/RowPinning.ts#L233-L247C30

table.getRow(rowId, true) is called on an aggregation row that no longer exists, and the component errors ungracefully.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/tanstack-table-s94mcy?file=src%2Fmain.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I am also opening a PR that solves the problem along side this issue

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant