Skip to content

Commit

Permalink
fix(ol-*-control): make sure control is updated on property changes
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Apr 13, 2024
1 parent 8db77a0 commit 507220d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/composables/useControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function useControl<T extends InnerControlType>(
const parent = controlBar !== null ? controlBar?.value : map;

const control = computed<T>(
() => new ControlType(properties as Record<string, unknown>),
() => new ControlType({ ...(properties as Record<string, unknown>) }),
);

control.value.set("order", attrs.order === undefined ? 0 : attrs.order);
Expand Down

0 comments on commit 507220d

Please # to comment.