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: DataTable row reorder is not working #3046

Closed
saulodias opened this issue Jul 8, 2022 · 3 comments · Fixed by #3050
Closed

DataTable: DataTable row reorder is not working #3046

saulodias opened this issue Jul 8, 2022 · 3 comments · Fixed by #3050
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@saulodias
Copy link
Contributor

saulodias commented Jul 8, 2022

Describe the bug

The feature to reorder rows on the PrimeReact DataTable is not working. The reorderableRows property seems to be missing.
https://www.primefaces.org/primereact/datatable/reorder/

I have put together an example on Stackblitz.
https://stackblitz.com/edit/react-ts-dmlh21?file=App.tsx,DataTableReorderDemo.tsx

The feature on PrimeNG is working just fine:
https://www.primefaces.org/primeng/table/reorder

Reproducer

https://codesandbox.io/s/primereact-datatable-reorder-demo-vjk6di?file=/src/DataTableReorderDemo.tsx

PrimeReact version

8.2.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome 103.0.5060.114

Steps to reproduce the behavior

  1. Click on any row of the table.
  2. Try to drag it.
  3. Drop it in a different position.

Expected behavior

As you drag the row from its original position the horizontal line nearest to the mouse pointer should be highlighted as you move up and down, indicating between what rows the row being dragged will be once you release the mouse button. See working example below:
image

Once you drop the row (by releasing the left mouse button) it should stick to the new position and an onRowReorder event should be emitted.
image

See the working example on PrimeNG:
https://www.primefaces.org/primeng/table/reorder

@saulodias saulodias added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Jul 8, 2022
@melloware
Copy link
Member

Excellent ticket. let me know if you find anything debugging!

saulodias pushed a commit to saulodias/primereact that referenced this issue Jul 9, 2022
@melloware melloware added this to the 9.0.0 milestone Jul 10, 2022
@melloware melloware linked a pull request Jul 10, 2022 that will close this issue
@melloware melloware added 👍 confirmed and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 10, 2022
mertsincan pushed a commit that referenced this issue Jul 15, 2022
Co-authored-by: Saulo Dias <saulo.dias@radixeng.com>
@mertsincan mertsincan modified the milestones: 9.0.0, 8.3.0 Jul 18, 2022
@AuthorProxy
Copy link

is it fixed? at 8.3.0 still not working @mertsincan

@melloware
Copy link
Member

@AuthorProxy if its not working open a new ticket with a new Code Sandbox reproducer pointing to 8.6.1 of PrimeReact.

Here is a StackBlitz showing it works with 8.6.1: https://stackblitz.com/edit/react-ts-ggpm6y?file=App.tsx,DataTableReorderDemo.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants