Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: re-order + resizable fails #6599

Closed
Holgrabus opened this issue May 8, 2024 · 2 comments
Closed

DataTable: re-order + resizable fails #6599

Holgrabus opened this issue May 8, 2024 · 2 comments
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@Holgrabus
Copy link

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.

@Holgrabus Holgrabus added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 8, 2024
@Rekl0w
Copy link
Contributor

Rekl0w commented May 9, 2024

Duplicate of #6558.

@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 9, 2024
@Holgrabus
Copy link
Author

Holgrabus commented May 14, 2024

Ok I got it, the answer is: add a "field" property to each column.

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

3 participants