Use columnOrder and initialize it, then the group column is always at the end
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 3.6k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
Describe the bug
When columns have a group column and the group column is in a non final position, and then initialize the columnOrder, you will find that the group column is always in the last position, even if you change the position of the group column;
like this demo
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/falling-lake-cu3vtg
Steps to reproduce
Open the link to see
Expected behavior
The group column can be displayed in its normal position
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows - Chrome@latest
react-table version
v8.9.1
TypeScript version
No response
Additional context
No response
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 linked CodeSandbox reproduction and inspect how columnOrder is initialized alongside the group column in the v8.9.1 example. Trace the column-order and grouping behavior, then verify that initializing columnOrder preserves the group column's configured non-final position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100