Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’3y agoβ€’
3 replies
maltebaer

passing data to infolist action

hey friends πŸ‘‹πŸ½,

i want to use filament to display repeatable data, like in some kind of accordion.

i use the infolist builder, passing my data via
state()
state()
. now my data includes details that i want to show inside a modal. i want to trigger the modal from within the section body, not the header. my idea is as follows:

public function fooInfolist(Infolist $infolist): Infolist
{
    return $infolist
        ->state($this->foo)
        ->schema([
            RepeatableEntry::make('foo')
                ->schema([
                    Section::make('name')
                        ->collapsible()
                        ->schema([
                            TextEntry::make('name'),
                            ViewEntry::make('bar')
                                ->view('bar')
                                ->registerActions([
                                    Action::make('showDetails')
                                        ->modalContent(view('bar-details'))
                                        ->infolist([
                                            Tabs::make('Tabs')
                                                ->tabs([
                                                    Tab::make('Tab 1')
                                                        ->schema([
                                                            TextEntry::make('bar.name')
                                                        ]),
                                                ])
                                        ])
                                ]),
                        ])
                ])
        ]);
}
public function fooInfolist(Infolist $infolist): Infolist
{
    return $infolist
        ->state($this->foo)
        ->schema([
            RepeatableEntry::make('foo')
                ->schema([
                    Section::make('name')
                        ->collapsible()
                        ->schema([
                            TextEntry::make('name'),
                            ViewEntry::make('bar')
                                ->view('bar')
                                ->registerActions([
                                    Action::make('showDetails')
                                        ->modalContent(view('bar-details'))
                                        ->infolist([
                                            Tabs::make('Tabs')
                                                ->tabs([
                                                    Tab::make('Tab 1')
                                                        ->schema([
                                                            TextEntry::make('bar.name')
                                                        ]),
                                                ])
                                        ])
                                ]),
                        ])
                ])
        ]);
}


the setup works fine. i have multiple cards and i can open the modal. my problem is, that i'm not able to pass the data (here
bar
bar
) inside the modal. i have two ideas, either create a custom view
bar-details.blade
bar-details.blade
or, even better, use another infolist builder inside the modal.

do you folks have any idea? or maybe even a completely different approach?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Infolist - send data to Action
FilamentFFilament / β“β”Šhelp
3y ago
Passing data to Bulk Action
FilamentFFilament / β“β”Šhelp
3y ago
Passing data to custom page through table action.
FilamentFFilament / β“β”Šhelp
3y ago
Database Notification Actions: Infolist in action?
FilamentFFilament / β“β”Šhelp
3y ago