-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Description
After editing a resource, the formOpen state switches from {formOpen: true} to {formOpen: false}. The edit view is still opened after editing, meaning the user still has an open form. While before editing users are prompted with the "do you really want to discard your changes" dialog should they have made changes to the form, after editing they can freely navigate away from the form due to the incorrect state.
To easily keep track of the state updates you can add this snipped in App.tsx during development:
const formOpen = useRecoilValue(isFormOpenState);
useEffect(() => { console.log(formOpen); }, [formOpen]);
Steps to reproduce
- open the details of a deployment
- do some changes to the form and do not save them
- try to navigate away (e.g. to the namespace overview)
- you will correctly be prompted with the "Discard Changes" dialog, click on cancel
- now save your changes
- do some additional changes
- again, try to navigate away (e.g. to the namespace overview)
Expected result
As before, when the resource opened in a form has been changed compared to the saved version, the user should be prompted with the "Discard Changes" dialog when trying to navigate away.
Actual result
The user can freely navigate away from the form.