mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fixes: component name update [calendar]
This commit is contained in:
parent
bd05db68d2
commit
99399556da
1 changed files with 17 additions and 1 deletions
|
|
@ -199,7 +199,8 @@ const computeComponentDiff = (appDiff, currentPageId, opts) => {
|
|||
) {
|
||||
const currentPageComponents = appDiff?.pages[currentPageId]?.components;
|
||||
|
||||
updateDiff = currentPageComponents;
|
||||
updateDiff = toRemoveExposedvariablesFromComponentDiff(currentPageComponents);
|
||||
|
||||
type = opts.includes('containerChanges') ? updateType.containerChanges : updateType.componentDefinitionChanged;
|
||||
} else if (opts.includes('componentAdded')) {
|
||||
const currentPageComponents = appDiff?.pages[currentPageId]?.components;
|
||||
|
|
@ -241,3 +242,18 @@ const computeComponentDiff = (appDiff, currentPageId, opts) => {
|
|||
|
||||
return { updateDiff, type, operation };
|
||||
};
|
||||
|
||||
function toRemoveExposedvariablesFromComponentDiff(object) {
|
||||
const copy = _.cloneDeep(object);
|
||||
const componentIds = _.keys(copy);
|
||||
|
||||
componentIds.forEach((componentId) => {
|
||||
const { component } = copy[componentId];
|
||||
|
||||
if (component?.exposedVariables) {
|
||||
delete component.exposedVariables;
|
||||
}
|
||||
});
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue