primefaces / primereact

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

Datatable: Horizontal scroll reset if item selected #6117

Open sja-cslab opened 6 months ago

sja-cslab commented 6 months ago

Describe the bug

If using a Datatable in with selectionMode="multiple" causes horizontal "scrolljump" if an Item is selected.

Reproducer

https://stackblitz.com/edit/vitejs-vite-t4glxh?file=package-lock.json,src%2FApp.jsx

PrimeReact version

10.5.1

React version

18.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to Reproducer
  2. Resize the Preview/Webcontainer so the DatatableTable gets horizontal scrollable
  3. Scroll to the right
  4. Select an Element

=> The table resets the horizontal scroll back to completely left

Expected behavior

The Scrollposition stays the same even on select as it is on vertical scroll

melloware commented 6 months ago

Duplicate of : https://github.com/primefaces/primereact/issues/3155

sja-cslab commented 1 month ago

@melloware issue is still there in 10.8.2 - at least in single select could you reopen?