How close filament modal in custom page

<x-filament::modal id='custom-modal-handle'>
<x-slot name='header'>Tambah Nominal</x-slot>
<div>{{ $this->form }}</div>
<x-slot name="actions">
<div class="flex justify-end">
<button type="submit" wire:click='save'>
Simpan
</button>
</div>
</x-slot>
</x-filament::modal>
<x-filament::modal id='custom-modal-handle'>
<x-slot name='header'>Tambah Nominal</x-slot>
<div>{{ $this->form }}</div>
<x-slot name="actions">
<div class="flex justify-end">
<button type="submit" wire:click='save'>
Simpan
</button>
</div>
</x-slot>
</x-filament::modal>
I have this modal form in filament custom page. how can I close the modal when user submit the form?
Solution:
thanks a lot for your response.. that's didn't work for me.. but I tried with this, and it works.. ...
L
LeandroFerreira40d ago
if you are using LW2
$this->emit('close-modal', ['id' => 'custom-modal-handle']);
$this->emit('close-modal', ['id' => 'custom-modal-handle']);
Solution
D
dyo40d ago
thanks a lot for your response.. that's didn't work for me.. but I tried with this, and it works..
$this->dispatchBrowserEvent('close-modal', ['id' => 'custom-modal-handle']);
$this->dispatchBrowserEvent('close-modal', ['id' => 'custom-modal-handle']);
A
awcodes40d ago
Just so you know, when you update to v3 of filament this will need to be just ->dispatch() 👍 It’s a livewire thing.
Want results from more Discord servers?
Add your server
More Posts
Backgrounds plugin by SWISI try to use this plugin by SWIS https://filamentphp.com/plugins/swisnl-backgrounds#remember which iGroup By in tablePlease is it possible for the id to be starting from 1 in each groupingproblem with customized searchable text columnhttps://filamentphp.com/docs/2.x/tables/columns/getting-started#searching Does anyone know the corrSave relationship first before creating modelSo I need to save the relationship first then create a model and sync itCalculate Totals in the footer for a table componentHow can calculate the total balance of the customers and show it in the footer .Note this table compFilter using columnsHello, I'm having difficulty creating a filter in a query that I inserted in the columns. How can I Hiring a senior mobile app developer from India or PakistanI have some mobile projects. I want someone have over 3 years experience. And especially I hope reacGet current row record in custom action```php Tables\Actions\Action::make('make_additional_payment') ->label('Наплати дSelect multiple preloaded options are reordered after selecting the inputI have a select multiple that is formFilled with options already attached on a BelongsToMany relatioError on trying to edit or create a new role at SHIELD pluginIm getting ```count(): Argument #1 ($value) must be of type Countable|array, null given``` this errotesting repeater / fillForm / fill default itemHi - I'm just getting started writing tests for my app with Pest. My first and most high-traffic resUse fa-icon in table builderI'm working in a project who already have a database in production. The database have a table with aIs there a difference between these two `Auth::user()` vs `Filament::auth()->user()`?Is there anytime where using one or the other is beneficial?larazeus popover pop under table header/footerHello, having a problem, when i add a popover in a table, it's showing under the tablefooter/header.