Skip to content

Commit a9508b7

Browse files
expose cancelChanges and cancelInsertChanges function to programatically cancel table changes
1 parent 4ee38eb commit a9508b7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableComp.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,26 @@ TableTmpComp = withMethodExposing(TableTmpComp, [
642642
comp.children.selection.children.selectedRowKeys.dispatchChangeValueAction([]);
643643
},
644644
},
645+
{
646+
method: {
647+
name: "cancelChanges",
648+
description: "",
649+
params: [],
650+
},
651+
execute: (comp, values) => {
652+
comp.children.columns.dispatchClearChangeSet();
653+
},
654+
},
655+
{
656+
method: {
657+
name: "cancelInsertChanges",
658+
description: "",
659+
params: [],
660+
},
661+
execute: (comp, values) => {
662+
comp.children.columns.dispatchClearInsertSet();
663+
},
664+
},
645665
]);
646666

647667
// exposing data

0 commit comments

Comments
 (0)