TanStack Table version
v9
Framework/Library version
NextJS 16
Describe the bug and the steps to reproduce it
AppTable appears to remount its children whenever table state changes.
This breaks table-level UI such as toolbars with controlled inputs. For example, an input that updates globalFilter loses focus after every keystroke because the toolbar subtree is remounted.
Minimal repro:
function Toolbar() {
const table = useTableContext()
return (
<input
value={table.state.globalFilter ?? ""}
onChange={(e) => table.setGlobalFilter(e.target.value)}
/>
)
}
Rendered inside:
<table.AppTable>
<table.Toolbar />
{...}
</table.AppTable>
Expected: AppTable should preserve child identity across table state updates.
Actual: children are remounted after each table state update.
This issue is also visible in the composable tables example.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/github/tanstack/table/tree/beta/examples/react/composable-tables?embed=1&theme=dark&preset=node&file=src/main.tsx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
TanStack Table version
v9
Framework/Library version
NextJS 16
Describe the bug and the steps to reproduce it
AppTableappears to remount its children whenever table state changes.This breaks table-level UI such as toolbars with controlled inputs. For example, an input that updates
globalFilterloses focus after every keystroke because the toolbar subtree is remounted.Minimal repro:
Rendered inside:
Expected:
AppTableshould preserve child identity across table state updates.Actual: children are remounted after each table state update.
This issue is also visible in the composable tables example.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/github/tanstack/table/tree/beta/examples/react/composable-tables?embed=1&theme=dark&preset=node&file=src/main.tsx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct