Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Show discard changes confirmation modal only when fields get touched #1323

Merged
merged 3 commits into from
Sep 26, 2024

Commits on Sep 23, 2024

  1. (fix) Show discard changes confirmation modal when fields get touched

    This PR tweaks the logic for showing the discard changes confirmation modal in the patient registration form. Previously, the modal was being shown in cases where the user had not made any changes. Now, the modal will only be shown when the user has made changes and attempts to navigate away from the form. This is done by checking whether any of the form fields have been [touched](https://formik.org/docs/api/formik#touched--field-string-boolean-). This aligns with the expected behavior of the form and provides a better user experience.
    
    Also, this PR refactors the `DeleteIdentifierConfirmationModal` to leverage Carbon's ModalHeader, ModalBody, and ModalFooter components. It also refactors its registration in the `routes.json` file so it leverages the `modal` property of the route definition. This aligns with our best practices for registering modals.
    denniskigen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    1efe5e2 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Configuration menu
    Copy the full SHA
    b576f37 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    4dbf86f View commit details
    Browse the repository at this point in the history