diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentTree.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentTree.svelte index 6bae359a17..3cacf3c096 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentTree.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentTree.svelte @@ -67,7 +67,7 @@ if (!component?._children?.length) { return false } - return openNodes[`nodeOpen-${component._id}`] !== false + return openNodes[`nodeOpen-${component._id}`] } const isChildOfSelectedComponent = component => { diff --git a/packages/builder/src/stores/builder/components.js b/packages/builder/src/stores/builder/components.js index 6bce50a614..122b9fd0ff 100644 --- a/packages/builder/src/stores/builder/components.js +++ b/packages/builder/src/stores/builder/components.js @@ -696,12 +696,12 @@ export class ComponentStore extends BudiStore { const previousSibling = parent._children[index - 1] if ( previousSibling._children?.length && - componentTreeNodes[`nodeOpen-${previousSibling._id}`] !== false + componentTreeNodes[`nodeOpen-${previousSibling._id}`] ) { let target = previousSibling while ( target._children?.length && - componentTreeNodes[`nodeOpen-${target._id}`] !== false + componentTreeNodes[`nodeOpen-${target._id}`] ) { target = target._children[target._children.length - 1] } @@ -736,7 +736,7 @@ export class ComponentStore extends BudiStore { if ( component._children?.length && (state.selectedComponentId === navComponentId || - componentTreeNodes[`nodeOpen-${component._id}`] !== false) + componentTreeNodes[`nodeOpen-${component._id}`]) ) { return component._children[0]._id } else if (!parent) { @@ -818,7 +818,7 @@ export class ComponentStore extends BudiStore { const definition = this.getDefinition(previousSibling._component) if ( definition.hasChildren && - componentTreeNodes[`nodeOpen-${previousSibling._id}`] !== false + componentTreeNodes[`nodeOpen-${previousSibling._id}`] ) { previousSibling._children.push(originalComponent) } @@ -874,7 +874,7 @@ export class ComponentStore extends BudiStore { const definition = this.getDefinition(nextSibling._component) if ( definition.hasChildren && - componentTreeNodes[`nodeOpen-${nextSibling._id}`] !== false + componentTreeNodes[`nodeOpen-${nextSibling._id}`] ) { nextSibling._children.splice(0, 0, originalComponent) }