primereact
primereact copied to clipboard
DataTable: Duplicate multi select column when reordering
Describe the bug
When enabling column reorder functionality while having a <Column selectionMode="multiple" headerStyle={{ width: '3rem' }/> and <Column rowEditor /> in the same datatable, the selection mode column is duplicated for what ever reason.
Reproducer
https://stackblitz.com/edit/uvmba6-qcunpx?file=src%2FApp.jsx
PrimeReact version
10.7.0
React version
18.x
Language
ES6
Build / Runtime
Create React App (CRA)
Browser(s)
tested in edge and chrome
Steps to reproduce the behavior
- Reorder Name column to be after code
Seen result: Columns ended up as:
- Checkbox
- Category
- code
- quantity
- checkbox (AGAIN)
- edit
Expected behavior
Columns should be in the following order:
- Checkbox
- Category
- code
- quantity
- edit
Marked it as a bug. But as a warning not all datatable features are designed to work with other features. Having both reorderable rows and editable rows feels like a bad UI/UX
i can confirm the existence of this bug, i have noticed it as well with <Column rowEditor /> even with selectionMode='single'.
it existed in 10.6, now also in 10.7. the problem exists with column reorder, i have not tested with row reorder.
This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!