JibayMcs
JibayMcs
FFilament
Created by JibayMcs on 4/17/2024 in #❓┊help
Create a "carousel" modal on ListRecords
Hi everyone ! I want to make a special thing to navigate through records on a table using a tweak of "ViewAction" (when you click on a row in the table $table->recordAction() I've made a copy of the ViewAction class to add Previous/Next button in extraFooterActions But I struggle on changing the content of the "data" on the modal form instance. Just below you'll find my actual class ! Thank's for your help 🙂
3 replies
FFilament
Created by JibayMcs on 9/24/2023 in #❓┊help
On closing a slide-over modal unable to listen to "close-modal" event
Hi ! I'm using a custom modal, by calling :
<x-filament::modal slide-over sticky-header sticky-footer width="5xl" id="my-modal">

<p>Here's my content</p>

</x-filament::modal>
<x-filament::modal slide-over sticky-header sticky-footer width="5xl" id="my-modal">

<p>Here's my content</p>

</x-filament::modal>
But on listening to the close-modal event nothing happens. Here the JS code:
document.addEventListener('livewire:initialized', () => {
Livewire.on('close-modal', ({id}) => {

console.log('close-modal');

if (id === 'my-modal') {
Livewire.dispatch('bot::unsubscribe');
}
});
});
document.addEventListener('livewire:initialized', () => {
Livewire.on('close-modal', ({id}) => {

console.log('close-modal');

if (id === 'my-modal') {
Livewire.dispatch('bot::unsubscribe');
}
});
});
Is this a Filament bug, or have I missed something? Thanks for you help ! Best regards.
1 replies