wire-elements / modal

Livewire component that provides you with a modal that supports multiple child modals while maintaining state.
MIT License
1.12k stars 131 forks source link

Upgrading from Livewire 2.5.1 to 2.5.2 breaks livewire response serialisation #63

Closed slakbal closed 3 years ago

slakbal commented 3 years ago

Hi,

For actions on a table, I have the following blade code:

<a wire:click="$emit('openModal', 'tenant.deactivate-modal', {{ json_encode(['tenant' => $tenant->id]) }})" wire:loading.attr="disabled" role="button" href="#" title="{{ __('Deactivate') }}">
    Deactivate
</a>

The above generates the following:

<a wire:click="$emit('openModal', 'tenant.deactivate-modal', {"tenant":1})" wire:loading.attr="disabled" role="button" href="#" title="Deactivate">
    Deactivate
</a>

For the tables I'm using: https://github.com/rappasoft/laravel-livewire-tables For the modals I'm using: https://github.com/livewire-ui/modal

Everything works with Livewire v2.5.1, the modal is called up and the action performed and livewire responds with the updated part. But once I upgrade to v2.5.2 the initial reder is correct, the modal is called up but after the component action is finished livewire responds with the following, which is clearly a broken response and it feels like an escaping/serialisation issue:

<a wire:click="$emit('openModal', 'tenant.deactivate-modal', {" wire:loading.attr="disabled" role="button" href="#" title="Deactivate">
    Deactivate
</a>

Not 100% sure why this is happening, any ideas? This only happens when I move from v2.5.1 to v2.5.2.

Any assistance would be appreciated!

Thanks!

labomatik commented 3 years ago

You should update livewire to 2.5.5

PhiloNL commented 3 years ago

Let me know if this is still an issue after updating.