F
Filamentβ€’4w ago
mathieutu

Weird behavior (component replaced by string) when livewire update.

Hi, I have a weird behavior that I don't understand and can't explain. When uploading a picture, on a particular page (create tenant one), the user switch menu is replaced by a < wire:id="..."> string. The issue is only with one very simple component from a plugin, on one page (custom view). I don't have the issue if I disable the plugin or if I remove the render hook. I don't have any issue on other pages (standards). Basically, this is my custom view
<div>
<x-filament-panels::topbar />
<main class="...">
<x-filament-panels::header
:heading="$this->getHeading()"
:subheading="$this->getSubHeading()"
:actions="$this->getCachedHeaderActions()"
/>
<x-filament-panels::form id="form" wire:submit="register">
{{ $this->form }}

<x-filament-panels::form.actions :actions="$this->getCachedFormActions()" />
</x-filament-panels::form>
</main>
</div>
<div>
<x-filament-panels::topbar />
<main class="...">
<x-filament-panels::header
:heading="$this->getHeading()"
:subheading="$this->getSubHeading()"
:actions="$this->getCachedHeaderActions()"
/>
<x-filament-panels::form id="form" wire:submit="register">
{{ $this->form }}

<x-filament-panels::form.actions :actions="$this->getCachedFormActions()" />
</x-filament-panels::form>
</main>
</div>
I have no idea where it could come from... Thanks for your help, Mathieu.
Solution:
I managed to fix the issue. The component needs to be in the layout and not in the view (which was my case). I can't explain why it changes anything, but I'm no Livewire expert at all... πŸ˜•
Jump to solution
5 Replies
mathieutu
mathieutuOPβ€’4w ago
FI, I opened an issue on the plugin repo, and the maintainer has no idea why it's behaving like that (Livewire dark magic?)
GitHub
Weird behavior, where the switch menu is replaced by a string on fi...
Hi, I have a weird behavior that I don't understand and can't explain. When uploading a picture, on a particular page (create tenant one), the user switch menu is replaced by a < wire:id...
mathieutu
mathieutuOPβ€’4w ago
Actually, it's not linked to the file upload at all, but with a livewire update:
toeknee
toekneeβ€’4w ago
You have a bug in your Switch to code by the lookfs of it.
mathieutu
mathieutuOPβ€’4w ago
This is a plugin, which adds a basic dropdown. Here is the code.
GitHub
filament-developer-logins/resources/views/livewire/menu-logins.blad...
This plugin allows you to enable one-click logins for your local Filament panels, which is useful when developing a Filament project with multiple users and various roles. - DutchCodingCompany/fila...
Solution
mathieutu
mathieutuβ€’4w ago
I managed to fix the issue. The component needs to be in the layout and not in the view (which was my case). I can't explain why it changes anything, but I'm no Livewire expert at all... πŸ˜•

Did you find this page helpful?