mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-24 08:53:30 +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(() => {
|
||||
if (formik.dirty) {
|
||||
addButtonRef.current?.scrollIntoView({ behavior: 'smooth' });
|
||||
}, [formik.values]);
|
||||
}
|
||||
}, [formik.values, formik.dirty]);
|
||||
|
||||
const handleReset = () => {
|
||||
formik.resetForm({ originalEnvironmentVariables });
|
||||
|
Loading…
Reference in New Issue
Block a user