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:
parent
87895091d8
commit
f445e60a1b
1 changed files with 8 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue