Skip to content

Commit

Permalink
Feature: return rows of cancled edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Dec 26, 2023
1 parent 5b6a3a2 commit f1191fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,11 @@ export default class MaterialTable extends React.Component {
onEditingCanceled = (mode, rowData) => {
if (mode === 'add') {
this.props.editable.onRowAddCancelled &&
this.props.editable.onRowAddCancelled();
this.props.editable.onRowAddCancelled(rowData);
this.setState({ showAddRow: false });
} else if (mode === 'update') {
this.props.editable.onRowUpdateCancelled &&
this.props.editable.onRowUpdateCancelled();
this.props.editable.onRowUpdateCancelled(rowData);
this.dataManager.changeRowEditing(rowData);
this.setState(this.dataManager.getRenderState());
} else if (mode === 'delete') {
Expand Down

0 comments on commit f1191fb

Please sign in to comment.