Skip to content

Conversation

nstepien
Copy link
Collaborator

Rows can be undefined, so copiedCell?.row === row can be true when copiedCell is nullish.

@nstepien nstepien requested a review from amanmahajan7 October 31, 2020 15:58
@nstepien nstepien self-assigned this Oct 31, 2020
rowClass={rowClass}
top={top}
copiedCellIdx={copiedCell?.row === row ? columns.findIndex(c => c.key === copiedCell.columnKey) : undefined}
copiedCellIdx={copiedCell !== null && copiedCell.row === row ? columns.findIndex(c => c.key === copiedCell.columnKey) : undefined}
Copy link
Collaborator

@amanmahajan7 amanmahajan7 Nov 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are looping through rows and rows type is readonly R[]; I am not sure when can row be undefined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R can be undefined like in our million cells demo.

@amanmahajan7 amanmahajan7 merged commit 0c18073 into canary Nov 2, 2020
@amanmahajan7 amanmahajan7 deleted the crash branch November 2, 2020 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants