diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx index 92f7e56912a..836285d8758 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx @@ -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 {