mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fixes: tabs default children saving
This commit is contained in:
parent
c74f075863
commit
1378166630
4 changed files with 8 additions and 5 deletions
|
|
@ -194,7 +194,6 @@ export const Container = ({
|
|||
if (componendAdded) {
|
||||
opts.componentAdded = true;
|
||||
}
|
||||
|
||||
appDefinitionChanged(newDefinition, opts);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [boxes]);
|
||||
|
|
@ -522,8 +521,8 @@ export const Container = ({
|
|||
const componentWithChildren = {};
|
||||
Object.keys(components).forEach((key) => {
|
||||
const component = components[key];
|
||||
const { parent } = component;
|
||||
if (parent) {
|
||||
|
||||
if (component?.parent) {
|
||||
componentWithChildren[parent] = {
|
||||
...componentWithChildren[parent],
|
||||
[key]: component,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ import { shallow } from 'zustand/shallow';
|
|||
import { useEditorActions, useEditorState, useEditorStore } from '@/_stores/editorStore';
|
||||
import { useAppDataActions, useAppInfo } from '@/_stores/appDataStore';
|
||||
import { useMounted } from '@/_hooks/use-mount';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { diff } from 'deep-object-diff';
|
||||
|
||||
|
|
|
|||
|
|
@ -223,9 +223,14 @@ const computeComponentDiff = (appDiff, currentPageId, opts) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (result[id]?.definition) {
|
||||
delete result[id].definition;
|
||||
}
|
||||
|
||||
result[id].type = componentMeta.component;
|
||||
result[id].parent = component.component.parent ?? null;
|
||||
result[id].layouts = appDiff.pages[currentPageId].components[id].layouts;
|
||||
|
||||
operation = 'create';
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export class CreateComponentTable1691006952074 implements MigrationInterface {
|
|||
},
|
||||
{
|
||||
name: 'parent',
|
||||
type: 'uuid',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue