0

Achievement goal

  • Draw a large amount of data on the table
  • Sticky header (scroll only the body)
  • Sortable by clicking the cell in the header
  • The data in that row can be updated by pressing the button

Example code (Minimal Reproducible)

https://codesandbox.io/s/nice-mclaren-b1vnhm

Using plugin

react-window : FixedSizeList
react-table : useSortBy

Question

Each one has been realized, but there is a bug.

Steps to reproduce

  1. Sort (some header)
  2. Press the button

Why reset the sort direction, when update data?

Nichons
  • 11
  • 1
  • Please update your question here to include a [minimal, complete, and reproducible code example](https://stackoverflow.com/help/minimal-reproducible-example) for the relevant code you've an issue working with. – Drew Reese Mar 24 '22 at 08:46
  • @DrewReese I updated. Please see item 'Example code (Minimal Reproducible)'. – Nichons Mar 24 '22 at 09:22

1 Answers1

0

following, the answer.(react-table doc)

how-do-i-stop-my-table-state-from-automatically-resetting-when-my-data-changes.

Nichons
  • 11
  • 1