chore: 🤖 add safeguards to table resize event handler#903
Conversation
🦋 Changeset detectedLatest commit: 55de404 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @punkbit's task in 42s —— View job Code ReviewGood fix for the reported NaN issue! The change is minimal, focused, and correct. One thing to flag before merge: 💡 Suggestion (non-blocking, but worth addressing)
const currentWidth = columnWidths[columnIndex]; // could be undefined
const nextWidth = columnWidths[nextColumnIndex]; // could be undefined
const newWidth = currentWidth + diff; // → NaN if undefined
const newNextWidth = nextWidth - diff; // → NaN if undefined
if (currentWidth === undefined || nextWidth === undefined) {
return;
}Everything else looks good — the undefined guard in |
|
Claude finished @punkbit's task in 27s —— View job Code Review
✅ Looks great! The fix is minimal, correct, and consistently applied. The previous review flagged that
Both follow the same early-return pattern — clean and consistent. No other issues found. Nice work! 🙌 |
📚 Storybook Preview Deployed✅ Preview URL: https://click-6kphsnm84-clickhouse.vercel.app Built from commit: |
Why?
Fix Table column resize producing NaN width values when columnWidths array is not fully initialized.
Reported in #898 cc @rndD
How?
Preview?
demo-safe-guards-table.mov