primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable: Duplicate multi select column when reordering

Open KirinDarkoJM opened this issue 1 year ago • 2 comments

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

  1. Reorder Name column to be after code

Seen result: Columns ended up as:

  1. Checkbox
  2. Category
  3. code
  4. quantity
  5. checkbox (AGAIN)
  6. edit

Expected behavior

Columns should be in the following order:

  1. Checkbox
  2. Category
  3. code
  4. quantity
  5. edit

KirinDarkoJM avatar Jul 04 '24 11:07 KirinDarkoJM

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

melloware avatar Jul 04 '24 11:07 melloware

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.

webdynamics-dev avatar Jul 19 '24 17:07 webdynamics-dev

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!

github-actions[bot] avatar Jul 15 '25 01:07 github-actions[bot]

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!

github-actions[bot] avatar Jul 23 '25 01:07 github-actions[bot]