-
Notifications
You must be signed in to change notification settings - Fork 502
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
Implement 'Discard Changes' Modal for Form Editing Confirmation #7255
Comments
We already have support for auto saving drafts for our <Form component, I think converting this basic html form to our higher order <Form component should resolve this issue alongside. cc: @rithviknishad |
@Ashesh3 I think @Keshav-0907 meant more like a "Confirm Navigate Away" popup to prevent accidental navigations. Yes, we can always enable form restorations too on top of this. |
Yep, I got that, but since we don't have it anywhere else, even for the more imp and longer forms like consultation, patient etc. Instead of adding this popup for all existing long forms, I feel we should just upgrade this form to support drafts, that serves the same purpose to get users back their data in case they navigate away unintentionally. Just my thoughts, open to discussions! This drafts solution also aligns with the required solution mentioned in the issue:
|
I agree with @Ashesh3 |
@rithviknishad Sir, I actually meant to address the unintentional data loss concern by adding a 'Discard Changes' confirmation modal. However, following @Ashesh3's suggestion, I think upgrading the form for draft support can be a better approach. I want to work on this issue. Can you please assign this to me? |
Hey, remember that our higher order <Form component already has drafts support, you just need to convert the shifting form to use that higher order <Form component. |
Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity. |
@Keshav-0907 are you still working on this issue? |
@rithviknishad it seems like @Keshav-0907 is inactive |
Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity. |
I am actually slightly busy in doing other issues [p2] so as of now I will unassign myself |
@Keshav-0907 Are you interested in taking this up? |
@gigincg Yeah sure, I will work on it |
@Keshav-0907 Assigned the issue to you. Do create a draft PR when you start working on it For any help, feel free to reach out here. Also join in on our slack community at https://slack.ohc.network |
@gigincg Sir Does this issue still persist? If no one is working on it, may I take it up? |
Hello @gigincg @rithviknishad can i work on this issue, I've understood the doings. |
Hi @rithviknishad, can i take up this issue. |
I'm working on the issue @rajku-dev |
I noticed an inactivity but that's alright go ahead. |
…ng-to-higherOrderForm-in-UpdateShifting
…ng-Higher-Order-Form-in-Update-Shifting-Form
Is your feature request related to a problem? Please describe.
Currently, when a user is updating a form with different fields and accidentally navigates away without saving, all updated data is lost.
Describe the solution you'd like
To mitigate the risk of unintentional data loss, we can implement a 'Discard Changes' modal that would serve as a confirmation step before discarding any modifications.
Additional context
( Video : No confirmation model when form is updated and user navigates away )
Screen.Recording.2024-02-23.at.2.03.56.PM.mov
Proposed Solution
Refactor the HTML Form used here to use the higher order
<Form>
component with draft supportThe text was updated successfully, but these errors were encountered: