From 09bb958f0ff23c32735d325dc835c0e31bd58119 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 27 Jan 2025 10:08:50 +0000 Subject: [PATCH] finally tracked down issue with urlStateSync causing update --- .../builder/src/stores/builder/components.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/stores/builder/components.ts b/packages/builder/src/stores/builder/components.ts index f1a4916973..a30cdaaf59 100644 --- a/packages/builder/src/stores/builder/components.ts +++ b/packages/builder/src/stores/builder/components.ts @@ -716,15 +716,16 @@ export class ComponentStore extends BudiStore { * * @param {string} componentId */ - select(componentId: string) { - builderStore.update(state => { - state.highlightedSetting = null - return state - }) - + select(id: string) { this.update(state => { - state.selectedComponentId = componentId - return state + // Only clear highlights if selecting a different component + if (!id.includes(state.selectedComponentId!)) { + builderStore.highlightSetting() + } + return { + ...state, + selectedComponentId: id, + } }) }