Skip to content

Commit

Permalink
Fixed bug on delete widget modal (#13945)
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketkatkar97 committed Nov 10, 2023
1 parent e9f0bb0 commit c641432
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ const DeleteWidgetModal = ({
}, []);

const handleOnEntityDeleteCancel = useCallback(() => {
setEntityDeleteState(ENTITY_DELETE_STATE);
setEntityDeleteState({
...ENTITY_DELETE_STATE,
softDelete: allowSoftDelete,
});
setName('');
setValue(allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE);
onCancel();
}, [onCancel]);
}, [onCancel, allowSoftDelete]);

const handleOnEntityDeleteConfirm = useCallback(async () => {
try {
Expand Down

0 comments on commit c641432

Please sign in to comment.