diff --git a/frontend/src/Editor/Components/Table/Table.jsx b/frontend/src/Editor/Components/Table/Table.jsx index 54a3311774..85767d777c 100644 --- a/frontend/src/Editor/Components/Table/Table.jsx +++ b/frontend/src/Editor/Components/Table/Table.jsx @@ -202,7 +202,10 @@ export function Table({ setExposedVariables({ changeSet: {}, dataUpdates: [], - }).then(() => mergeToTableDetails({ dataUpdates: {}, changeSet: {} })); + }).then(() => { + mergeToTableDetails({ dataUpdates: {}, changeSet: {} }); + fireEvent('onCancelChanges'); + }); } const changeSet = tableDetails?.changeSet ?? {}; diff --git a/frontend/src/Editor/WidgetManager/widgetConfig.js b/frontend/src/Editor/WidgetManager/widgetConfig.js index ed18598bc8..d9c0437568 100644 --- a/frontend/src/Editor/WidgetManager/widgetConfig.js +++ b/frontend/src/Editor/WidgetManager/widgetConfig.js @@ -239,6 +239,7 @@ export const widgets = [ onBulkUpdate: { displayName: 'Bulk update' }, onPageChanged: { displayName: 'Page changed' }, onSearch: { displayName: 'Search' }, + onCancelChanges: { displayName: 'Cancel changes' }, onSort: { displayName: 'On sorting columns' }, onCellValueChanged: { displayName: 'Cell value changed' }, onFilterChanged: { displayName: 'Filter changed' }, diff --git a/frontend/src/_helpers/appUtils.js b/frontend/src/_helpers/appUtils.js index 4ddd7a3746..e0f76ededa 100644 --- a/frontend/src/_helpers/appUtils.js +++ b/frontend/src/_helpers/appUtils.js @@ -512,6 +512,7 @@ export async function onEvent(_ref, eventName, options, mode = 'edit') { 'onOpen', 'onClose', 'onRowClicked', + 'onCancelChanges', 'onSort', 'onCellValueChanged', 'onFilterChanged',