Skip to content

Commit

Permalink
fix(QuerySettingsForm): remove excessive updates (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
astandrik committed Aug 1, 2024
1 parent 0a18fab commit a41bbff
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,10 @@ interface QuerySettingsFormProps {
}

function QuerySettingsForm({initialValues, onSubmit, onClose}: QuerySettingsFormProps) {
const {control, handleSubmit, reset} = useForm<QuerySettings>({
const {control, handleSubmit} = useForm<QuerySettings>({
defaultValues: initialValues,
});

React.useEffect(() => {
reset(initialValues);
}, [initialValues, reset]);

return (
<form onSubmit={handleSubmit(onSubmit)}>
<Dialog.Body className={b('dialog-body')}>
Expand Down

0 comments on commit a41bbff

Please sign in to comment.