diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index d1dffbb8b4..1200cebeb2 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -769,7 +769,7 @@ export const getFrontendStore = () => { await store.actions.screens.patch(screen => { // Find the selected component let selectedComponentId = state.selectedComponentId - if (["navigation", "screen"].includes(selectedComponentId)) { + if (selectedComponentId.startsWith(`${screen._id}-`)) { selectedComponentId = screen?.props._id } const currentComponent = findComponent( diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte index 4500723027..248bbc8141 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/new/_components/NewComponentPanel.svelte @@ -1,6 +1,6 @@