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.
This commit is contained in:
padreug 2025-09-14 23:46:44 +02:00
parent 87895091d8
commit f445e60a1b

View file

@ -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'
}
}
</script>