F
Filament3mo ago
Xavi

Sidebar action modal

Does anyone know if it is possible to add a button on the sidebar to open a modal for the contact form?
Solution:
Hi ! Something like this can help you ? ```php ->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() => Blade::render('<x-filament::button wire:click="$dispatch('open-modal', { id: 'contact-form-modal' })">Test</x-filament::button>')...
Jump to solution
4 Replies
Solution
JibayMcs
JibayMcs3mo ago
Hi ! Something like this can help you ?
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() =>
Blade::render('<x-filament::button wire:click="$dispatch(\'open-modal\', { id: \'contact-form-modal\' })">Test</x-filament::button>')
);
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() =>
Blade::render('<x-filament::button wire:click="$dispatch(\'open-modal\', { id: \'contact-form-modal\' })">Test</x-filament::button>')
);
JibayMcs
JibayMcs3mo ago
(or directly a livewire component handling your form+modal)
JibayMcs
JibayMcs3mo ago
No description
Xavi
XaviOP3mo ago
it works, thanks @JibayMcs !
Want results from more Discord servers?
Add your server