[ Feature ] :: Table :: event on discard changes :: (#4158)

* discard changes :: event added

* develop merge
This commit is contained in:
Kiran Ashok 2022-10-13 14:25:47 +05:30 committed by GitHub
parent b98d68ad04
commit f734ba0d3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -202,7 +202,10 @@ export function Table({
setExposedVariables({
changeSet: {},
dataUpdates: [],
}).then(() => mergeToTableDetails({ dataUpdates: {}, changeSet: {} }));
}).then(() => {
mergeToTableDetails({ dataUpdates: {}, changeSet: {} });
fireEvent('onCancelChanges');
});
}
const changeSet = tableDetails?.changeSet ?? {};

View file

@ -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' },

View file

@ -512,6 +512,7 @@ export async function onEvent(_ref, eventName, options, mode = 'edit') {
'onOpen',
'onClose',
'onRowClicked',
'onCancelChanges',
'onSort',
'onCellValueChanged',
'onFilterChanged',