primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.97k stars 1.06k forks source link

DataTable: Duplicate Columns Issue on Re-render with Selection Column and rowReorder in DataTable #7316

Open Oko-Tester opened 1 month ago

Oko-Tester commented 1 month ago

Describe the bug

In my React application I use PrimeReact's DataTable component together with rowReorder and selectionMode. When I move a column, an additional rowReorder icon (a new column) appears in the table. This problem only occurs when rowReorder and selectionMode are used at the same time.

image

Reproducer

https://stackblitz.com/edit/wsz2q2?file=src%2FApp.jsx

System Information

**PrimeReact-Version**
"primereact": "^10.8.3",

Steps to reproduce the behavior

Expected behavior

No additional rowReorder column should appear when a column is moved.

Observed behavior: A new column with a rowReorder icon appears each time a column is moved.

melloware commented 1 month ago

Definitely a bug.