From f1191fb1b815b6a134e1461d5216bebdf90cdd95 Mon Sep 17 00:00:00 2001 From: Domino987 Date: Tue, 26 Dec 2023 11:51:45 +0100 Subject: [PATCH] Feature: return rows of cancled edits --- src/material-table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material-table.js b/src/material-table.js index 5a56cd7a..7e936e09 100644 --- a/src/material-table.js +++ b/src/material-table.js @@ -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') {