primefaces / primefaces/primereact

DataTable: Column Reorder Indicator Incorrect

Open
#6,580 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When reordering columns, the indicator icon will sometimes show up in the incorrect position

image

Reproducer

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

PrimeReact version

10.6.5

React version

18.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior
  1. Drag the Code column over the Name column
  2. Observe that while dragging over the left half of the Name column, the indicator is shown to the left of the column containing the row reorder icons
  3. Drop the column at that position and observe that the Code column is now to the right of the Name column as expected
Expected behavior

The column reorder indicator should always be displayed to the right of the Name column when hovering over it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducer in src/App.jsx and follow the DataTable column-reordering behavior shown in the StackBlitz example. Reproduce the drag over the left half of the Name column; done means the indicator is displayed to the right of Name while the resulting column order remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.