Skip to content

Commit

Permalink
Use lastChanged for onCellCommit coordinates (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
chasingmaxwell committed Aug 1, 2022
1 parent 42ce608 commit 3a7a907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spreadsheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const Spreadsheet = <CellType extends Types.CellBase>(
const prevState = prevStateRef.current;
if (state.lastCommit && state.lastCommit !== prevState.lastCommit) {
for (const change of state.lastCommit) {
onCellCommit(change.prevCell, change.nextCell, state.active);
onCellCommit(change.prevCell, change.nextCell, state.lastChanged);
}
}

Expand Down

0 comments on commit 3a7a907

Please sign in to comment.