luvi-ui / laravel-luvi

UI components for Laravel you can copy and paste into your app. shadcn-ui like. Built with Blade and AlpineJS. Usable with Livewire.
https://laravel-luvi.com
MIT License
207 stars 9 forks source link

Adapt dialog to accept outside input #8

Closed michaelklopf closed 2 weeks ago

michaelklopf commented 2 weeks ago

We encountered problems when using the dialog. The dialog was closed automatically, also we couldn't bind a show boolean value we control in our component. This PR fixes both issues, the former with wire:ignore.self, the latter with correct x-data usage throughout the dialog component.

wire:ignore.self because showModal adds an open attribute, which is removed during a Livewire update.