mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
Fix: remove events and exposed variables from component definition to avoid backend Component entity error
This commit is contained in:
parent
7b875ad10e
commit
eee6cc8b55
1 changed files with 9 additions and 1 deletions
|
|
@ -1236,8 +1236,16 @@ export const createComponentsSlice = (set, get) => ({
|
|||
);
|
||||
}
|
||||
|
||||
const oldComponent = get().modules[moduleId].pages[currentPageIndex].components[componentId].component;
|
||||
const { events, exposedVariables, ...filteredDefinition } = oldComponent.definition || {};
|
||||
|
||||
const diff = {
|
||||
[componentId]: { component: get().modules[moduleId].pages[currentPageIndex].components[componentId].component },
|
||||
[componentId]: {
|
||||
component: {
|
||||
...oldComponent,
|
||||
definition: filteredDefinition,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
if (saveAfterAction) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue