mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
env variables view: scroll only when form is dirty
This commit is contained in:
parent
1057f54f2f
commit
e680d0d71d
@ -87,8 +87,10 @@ const EnvironmentVariables = ({ environment, collection, setIsModified, original
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
addButtonRef.current?.scrollIntoView({ behavior: 'smooth' });
|
||||
}, [formik.values]);
|
||||
if (formik.dirty) {
|
||||
addButtonRef.current?.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
}, [formik.values, formik.dirty]);
|
||||
|
||||
const handleReset = () => {
|
||||
formik.resetForm({ originalEnvironmentVariables });
|
||||
|
Loading…
Reference in New Issue
Block a user