Skip to content

Commit

Permalink
fix: using value instead of defaultValue
Browse files Browse the repository at this point in the history
  • Loading branch information
yuusheng committed Feb 6, 2025
1 parent 673b3d1 commit ee2e94c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/panes/configure-panes/custom/custom-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ const VIACustomControl = (props: VIACustomControlProps) => {
const buttonOption: any[] = options || [1];
return (
<AccentButton
onClick={() =>
props.updateValue(name, ...command, buttonOption[0])
}
>Click</AccentButton>
onClick={() => props.updateValue(name, ...command, buttonOption[0])}
>
Click
</AccentButton>
);
}
case 'range': {
Expand Down Expand Up @@ -149,7 +149,7 @@ const VIACustomControl = (props: VIACustomControlProps) => {
option && props.updateValue(name, ...command, +option.value)
}
options={selectOptions}
defaultValue={selectOptions.find((p: any) => value[0] === p.value)}
value={selectOptions.find((p: any) => value[0] === p.value)}
/>
);
}
Expand Down

0 comments on commit ee2e94c

Please sign in to comment.