The "are you sure" modal window is not offered after re-editing.

Description

Overview: When you change it again in the settings after saving, when you try to navigate, the "are you sure" modal window is not offered. This behavior is observed for all inn-reach settings.
Steps to Reproduce:
 # Log into FOLIO environment as User with the "Settings (inn-reach): All INN-Reach settings: CRUD" permission.
 # Go to Settings > INN-Reach > Circulation settings > INN-Reach paging slip templates.
 # Click on the "Central server" field.
 # Select central server from the list.
 # Edit the data in the form.
 # Click "Save" button.
 # Edit the data in the form one more time.
 # Navigate away from the un-saved form.
 
Expected Results: The "are you sure" modal is presented with the message "There are unsaved changes" and with two active buttons: "Keep editing", "Close without saving".
Actual Results: User Navigate away from the un-saved form without saving.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

1

Checklist

hide

TestRail: Results

Activity

Show:

Tim Auger August 22, 2022 at 4:25 PM

Thanks for the access info, . This issue passed and is verified.

Tim Auger August 18, 2022 at 3:46 PM

I'd love to look at this in the noted environment. But I don't have access. How might I gain access?

Priyanka Terala August 9, 2022 at 11:58 AM

Hi ,
I have tested your draft and it is working as expected.

Thank you!

Michal Kuklis August 5, 2022 at 4:48 PM
Edited

I took a look at this and I think the issue here is that the form is not being closed after the submission. This is a different pattern compared to how other forms work in Folio.

I think the best way to approach it would be to reset the form after successful submission. Similar to:

https://github.com/final-form/react-final-form/issues/21#issuecomment-349024729

I created a little draft here (but could not test it)

https://github.com/folio-org/ui-inn-reach/pull/238/files

Would you mind giving it a try?

Priyanka Terala July 20, 2022 at 3:24 PM

Hi  

On re-editing a form and navigating away from un-saved form, the confirmation 
modal(that is defined in stripes-final-form) is not invoked.

After some analysis, I see that the form state "submitSucceeded" is 
1. set to true on save.
2. retains the same value on form re-edit, however, dirty state is updated to true.

Hence, the confirmation modal is not invoked.

Is this expected and is to be handled at component level?
or
Is this a bug?

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Volaris

Fix versions

Release

Morning Glory (R2 2022) Bug Fix

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created June 30, 2022 at 1:10 PM
Updated August 22, 2022 at 4:31 PM
Resolved August 22, 2022 at 4:31 PM
TestRail: Cases
TestRail: Runs