msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Interaction with table header resets side scroll #5251

Open lache-melvin opened 1 week ago

lache-melvin commented 1 week ago

What went wrong? 😲

Clicking column sort/select all when scrolled to the right, resets the scroll. Tooltips aren't stoked about it: https://github.com/user-attachments/assets/54f59bd8-7042-4a43-80bd-d8c761f98e24

Expected behaviour 🤔

Can interact with the header and maintain position in scroll

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Somewhere with many-column table (i.e. shipment detail)
  2. Have narrow enough a screen to need to scroll to the right
  3. Interact with the headers somehow
  4. Scroll resets

Your environment 🌱

mark-prins commented 1 week ago

The problem is that the table state changes - it's set to a new object so the entire table has to re-render. Possibly will have to remember the scroll value and reset?