Skip to content
Discussion options

You must be logged in to vote

The behavior you observed happens because of two factors:

  1. Default Row IDs are indices: Without a custom getRowId, TanStack Table keys rows by their array index ("0", "1", "2"). When page 2 loads, index "2" resolves to the 3rd row of page 2 rather than your original row.
  2. Server-side data replaces the array: TanStack Table is a headless state manager—it can only render rows whose data exists in the current data array. When page 2 loads, the server response omitted page 1's pinned item.

Here is how to implement cross-page server-side row pinning reliably:


Step 1: Supply getRowId with a Unique Identifier

Tell TanStack Table to track rows by their unique ID (e.g., database primary key) rath…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lflangis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants