icflorescu / icflorescu/mantine-datatable
Add option to disable column order preserving
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
It looks like in order for column dragging to work, a storeColumnsKey must be supplied to the table. This works fine, however I have a table in which users can dynamically add columns. When these columns are added by the user, I'd prefer for them to be rendered in the order specified in the columns array in the useDataTableColumns hook. Instead, they are always added to the right side of the table. I have a pinned ellipsis menu as the last column, and it would be nice to have it stay there when new columns are added.
Describe the solution you'd like
Perhaps introduce a new prop (preserveColumnOrder?) where users could set to false if they want to opt out of this default behaviour.
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 by locating the useDataTableColumns hook and references to storeColumnsKey, then trace how dynamically added columns are ordered. Done means an opt-out path keeps newly added columns in the order specified by the columns array while preserving the existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100