© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
dyo

Passing data modalContent through component

I'm working with custom action to open a custom modal view, like these
    protected function getTableHeaderActions(): array
    {
        return [
            Action::make('format sebaran')->button()
                ->action(fn () => $this->record->advance())
                ->modalContent(
                    fn () => view(
                        'filament.pages.format-sebaran',
                        ['list' => FormatSebaranResource::collection($this->sebaran->take(10000))]
                    )
                )->modalActions([
                    ModalActionsAction::make('tutup')->cancel()
                        ->color('secondary')
                ]),
        ];
    }
    protected function getTableHeaderActions(): array
    {
        return [
            Action::make('format sebaran')->button()
                ->action(fn () => $this->record->advance())
                ->modalContent(
                    fn () => view(
                        'filament.pages.format-sebaran',
                        ['list' => FormatSebaranResource::collection($this->sebaran->take(10000))]
                    )
                )->modalActions([
                    ModalActionsAction::make('tutup')->cancel()
                        ->color('secondary')
                ]),
        ];
    }

The problem is, I want to send only $this->sebaran->take(1000), and create a new collection in component mount() or render(), so I can user wire:init when the data is ready to use..

What should I do?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Directly Passing Form in modalContent
FilamentFFilament / ❓┊help
3y ago
Livewire component in Action modalContent? Help
FilamentFFilament / ❓┊help
5mo ago
Livewire Component on ModalContent close modal
FilamentFFilament / ❓┊help
2y ago
Passing data to custom page through table action.
FilamentFFilament / ❓┊help
3y ago