mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
fix: resolve uncloseable database restore modal on MariaDB import (#7335)
Fixes the "Snapshot missing on Livewire component" error that occurs when toggling the "Backup includes all databases" checkbox during MariaDB database import operations. Root Cause: - ActivityMonitor component was initialized without proper lifecycle hooks - When parent Import component re-rendered (via checkbox toggle), the ActivityMonitor's Livewire snapshot became stale - Missing null checks caused errors when querying with undefined activityId - No state cleanup when slide-over closed, causing issues on subsequent opens Changes: - Add updatedActivityId() lifecycle hook to ActivityMonitor for proper hydration - Add defensive null check in hydrateActivity() to prevent query errors - Track activityId in Import component for state management - Add slideOverClosed event dispatch in slide-over component - Add event listener in Import component to reset activityId on close Testing: - Manually verify checkbox toggle doesn't trigger popup - Verify actual restore operations work correctly - Test both file-based and S3-based restore methods - Ensure X button properly closes the modal - Verify no console errors or Livewire warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
@props(['closeWithX' => false, 'fullScreen' => false])
|
||||
<div x-data="{
|
||||
slideOverOpen: false
|
||||
}" {{ $attributes->merge(['class' => 'relative w-auto h-auto']) }}>
|
||||
}"
|
||||
x-init="$watch('slideOverOpen', value => {
|
||||
if (!value) {
|
||||
$dispatch('slideOverClosed')
|
||||
}
|
||||
})"
|
||||
{{ $attributes->merge(['class' => 'relative w-auto h-auto']) }}>
|
||||
{{ $slot }}
|
||||
<template x-teleport="body">
|
||||
<div x-show="slideOverOpen" @if (!$closeWithX) @keydown.window.escape="slideOverOpen=false" @endif
|
||||
|
||||
Reference in New Issue
Block a user