finally tracked down issue with urlStateSync causing update

This commit is contained in:
Peter Clement 2025-01-27 10:08:50 +00:00
parent 09f4db6b57
commit 09bb958f0f
1 changed files with 9 additions and 8 deletions

View File

@ -716,15 +716,16 @@ export class ComponentStore extends BudiStore<ComponentState> {
* *
* @param {string} componentId * @param {string} componentId
*/ */
select(componentId: string) { select(id: string) {
builderStore.update(state => {
state.highlightedSetting = null
return state
})
this.update(state => { this.update(state => {
state.selectedComponentId = componentId // Only clear highlights if selecting a different component
return state if (!id.includes(state.selectedComponentId!)) {
builderStore.highlightSetting()
}
return {
...state,
selectedComponentId: id,
}
}) })
} }