fix: use stable wire:key values for Docker Compose preview fields
Replace dynamic wire:key values that included the full command string
with stable, descriptive identifiers to prevent unnecessary re-renders
and potential issues with special characters.
Changes:
- Line 270: wire:key="preview-{{ $command }}" → "docker-compose-build-preview"
- Line 279: wire:key="start-preview-{{ $command }}" → "docker-compose-start-preview"
Benefits:
- Prevents element recreation on every keystroke
- Avoids issues with special characters in commands
- Better performance with long commands
- Follows Livewire best practices
The computed properties (dockerComposeBuildCommandPreview and
dockerComposeStartCommandPreview) continue to handle reactive updates
automatically, so preview content still updates as expected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d753d49ce6
commit
b4b619c8ac
1 changed files with 2 additions and 2 deletions
|
|
@ -267,7 +267,7 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
|||
label="Custom Start Command" />
|
||||
</div>
|
||||
@if ($this->dockerComposeCustomBuildCommand)
|
||||
<div wire:key="preview-{{ $this->dockerComposeCustomBuildCommand }}">
|
||||
<div wire:key="docker-compose-build-preview">
|
||||
<x-forms.input
|
||||
readonly
|
||||
value="{{ $this->dockerComposeBuildCommandPreview }}"
|
||||
|
|
@ -276,7 +276,7 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
|||
</div>
|
||||
@endif
|
||||
@if ($this->dockerComposeCustomStartCommand)
|
||||
<div wire:key="start-preview-{{ $this->dockerComposeCustomStartCommand }}">
|
||||
<div wire:key="docker-compose-start-preview">
|
||||
<x-forms.input
|
||||
readonly
|
||||
value="{{ $this->dockerComposeStartCommandPreview }}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue