fix(tablev2): keep RenderRow stable #1120
+209
−140
Draft
Claude / Claude Code Review
required action
Jun 1, 2026 in 3m 27s
Claude Code Review: attention required
- Stale ref capture for
onSingleRowSelectedinMultiSelectableContent.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
→ ReadonSingleRowSelectedRef.currentinside the click handler - Stale ref capture for
onRowSelectedinSingleSelectableContent.tsx:103— same pattern: ref captured at render time instead of at call time
→ ReadonRowSelectedRef.currentinside theonClickandonKeyDownhandlers activeRowId/selectedIdinuseMemodeps causes remount on selection change inMultiSelectableContent.tsx:235— when these values change,useMemoreturns 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 inSingleSelectableContentwithselectedId.
→ Move these values into refs and pass throughitemDataso rows re-render (cheap) rather than remount (expensive)- Dead
RenderRowTypeexport inTableCommon.tsx:131— no remaining importers after this change
→ RemoveRenderRowTypeand the unusedCSSPropertiesimport
💡 No review instructions found. Add a .github/copilot-instructions.md or .claude/REVIEW.md file to improve quality of review.
Loading