HeaderContext and CellContext types should use ReactTable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 3.6k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
TanStack Table version
9.0.0-alpha.32
Framework/Library version
react@19.1.0
Describe the bug and the steps to reproduce it
When defining cell or header in the column definitions, the type of the props provided, CellContext and HeaderContext respectively, is inaccurate. The type of the table prop should be ReactTable instead of Table. Without, a cell cannot use table.Subscribe that became available in the alpha 9.
In the example, you can see in the logs that the table provided as prop does actually have the properties.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/sandbox/yq2lwx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not have time to dig into it
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CellContext and HeaderContext type definitions used by column definitions, and compare their table prop with the ReactTable and Table types. Reproduce the mismatch in the linked CodeSandbox, then verify that cell and header callbacks expose ReactTable features such as table.Subscribe without type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100