mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-22 04:05:42 +00:00
env variables view: scroll only when form is dirty
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user