Skip to content

Commit

Permalink
fix: remove excessive updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Standrik authored and Anton Standrik committed Jul 31, 2024
1 parent c767175 commit b41b323
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 b41b323

Please sign in to comment.