Closed Holgrabus closed 6 months ago
When we have resizableColumns + reorderableColumns options activated, the column re-order is failing.
It duplicates the first column 2 times and set the moved column at the end.
Example: Before NAME | COUNTRY | AGENT | DATE | BALANCE | STATUS | ACTIVITY
I tried to move AGENT before COUNTRY After
NAME | NAME | COUNTRY | DATE | BALANCE | STATUS | ACTIVITY | NAME | AGENT
I forked an example from your doc and only added these 2 options.
https://stackblitz.com/edit/qhavtj?file=src%2FApp.jsx
10.6.5
18.x
TypeScript
Create React App (CRA)
Chrome 124
It's very easy, just drag and drop a column (any column) and you will see a duplicate of the first one.
Reorder columns, not create duplicates.
Duplicate of #6558.
Ok I got it, the answer is: add a "field" property to each column.
Describe the bug
When we have resizableColumns + reorderableColumns options activated, the column re-order is failing.
It duplicates the first column 2 times and set the moved column at the end.
Example: Before NAME | COUNTRY | AGENT | DATE | BALANCE | STATUS | ACTIVITY
I tried to move AGENT before COUNTRY After
NAME | NAME | COUNTRY | DATE | BALANCE | STATUS | ACTIVITY | NAME | AGENT
I forked an example from your doc and only added these 2 options.
Reproducer
https://stackblitz.com/edit/qhavtj?file=src%2FApp.jsx
PrimeReact version
10.6.5
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 124
Steps to reproduce the behavior
It's very easy, just drag and drop a column (any column) and you will see a duplicate of the first one.
Expected behavior
Reorder columns, not create duplicates.