Skip to content

docs(tablev2): document memoizing columns to avoid cell remounts

f463fc4
Select commit
Loading
Failed to load commit list.
Draft

fix(tablev2): keep RenderRow stable #1120

docs(tablev2): document memoizing columns to avoid cell remounts
f463fc4
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review required action Jun 1, 2026 in 3m 27s

Claude Code Review: attention required

  • Stale ref capture for onSingleRowSelected in MultiSelectableContent.tsx:158 — ref is read at render time into a local variable instead of inside the click handler, so the truthiness check that decides single-select vs multi-select behavior can use a stale value
    → Read onSingleRowSelectedRef.current inside the click handler
  • Stale ref capture for onRowSelected in SingleSelectableContent.tsx:103 — same pattern: ref captured at render time instead of at call time
    → Read onRowSelectedRef.current inside the onClick and onKeyDown handlers
  • activeRowId / selectedId in useMemo deps causes remount on selection change in MultiSelectableContent.tsx:235 — when these values change, useMemo returns a new component type, so react-window unmounts and remounts all rows — the same flashing problem this PR fixes for other re-render triggers. Same issue in SingleSelectableContent with selectedId.
    → Move these values into refs and pass through itemData so rows re-render (cheap) rather than remount (expensive)
  • Dead RenderRowType export in TableCommon.tsx:131 — no remaining importers after this change
    → Remove RenderRowType and the unused CSSProperties import

💡 No review instructions found. Add a .github/copilot-instructions.md or .claude/REVIEW.md file to improve quality of review.