Skip to content

Commit

Permalink
no reset to initial value when watching a control, see #202
Browse files Browse the repository at this point in the history
  • Loading branch information
dpwoert committed Jan 18, 2024
1 parent b135e78 commit 6d7842f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/layers/src/SidebarRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ const Control = ({ layers, controlPath }: ControlProps) => {
label={control.label}
options={control.options}
select={select}
hasChanges={!shallowEqual(control.value, control.initialValue)}
hasChanges={
!shallowEqual(control.value, control.initialValue) &&
!control.watching
}
set={(newValue: any) => layers.setControl(control.path, newValue)}
reset={() => layers.resetControl(control.path)}
/>
Expand Down

0 comments on commit 6d7842f

Please sign in to comment.