HomePhabricator
Diffusion Comm 45ceb67981c8

[web] Handle unsaved changes with the UnsavedChangesModal

Description

[web] Handle unsaved changes with the UnsavedChangesModal

Summary:
If there are any changes in the create role screen, we want to push the UnsavedChangesModal if a user tries to click "Back" or the X button on the Modal. I had to check elements individually for the rolePermissions / pendingRolePermissions array since after selecting a permission and then deselecting it, simply using a === would no longer work on the two arrays since they would not be of the same reference.

ENG-4428

Depends on D8595

Test Plan:
Tested the modal to confirm that the UnsavedChangesModal appears when it should

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8596

Details

Provenance
rohanAuthored on Jul 26 2023, 11:56 AM
Reviewer
atul
Differential Revision
D8596: [web] Handle unsaved changes with the UnsavedChangesModal
Parents
rCOMM4485fb3fd69d: [web] Add save functionality to the create role modal
Branches
Unknown
Tags
Unknown