From f445e60a1b716e53bf3712910e90429d9cfc1586 Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 14 Sep 2025 23:46:44 +0200 Subject: [PATCH] Fix close on x for ReceiveDialog functionality - Updated the onOpenChange method to handle dialog open/close state changes more effectively. - Added cleanup logic for when the dialog is closed, resetting the form and selected payment link. These changes improve the user experience by ensuring the dialog state is managed consistently, enhancing overall usability. --- src/modules/wallet/components/ReceiveDialog.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/wallet/components/ReceiveDialog.vue b/src/modules/wallet/components/ReceiveDialog.vue index 40b37ce..1328ea1 100644 --- a/src/modules/wallet/components/ReceiveDialog.vue +++ b/src/modules/wallet/components/ReceiveDialog.vue @@ -162,10 +162,17 @@ function closeDialog() { activeTab.value = 'create' } -// Refresh pay links when dialog opens +// Handle dialog open/close state changes function onOpenChange(open: boolean) { if (open && walletService) { walletService.refresh() + } else if (!open) { + // Dialog is being closed (including X button) - just emit the update + emit('update:open', false) + // Clean up state + resetForm() + selectedPayLink.value = null + activeTab.value = 'create' } }