© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
Hugo

Collapse all previous repeater items on addAction

Hi,

On my repeater, what can I do so that when I click on the button to add an item, all previous items become collapsed?
I can't find a solution in the documentation

Forms\Components\Repeater::make('services')
     ->label('Services')
     ->hintIcon('heroicon-o-information-circle', 'Ignorez cette étape si vous ne souhaitez pas associer de service au bénévole.')
     ->hintColor('primary')
     ->addActionLabel('Ajouter un service au bénévole')
     ->reorderableWithDragAndDrop(false)
     ->collapsible()
     ->defaultItems(0)
     ->itemLabel(fn(array $state): ?string => Service::find($state['service_id'])->serviceType->name ?? null)
     ->deleteAction(fn(Action $action) => $action->requiresConfirmation())
     ->schema([...]),
Forms\Components\Repeater::make('services')
     ->label('Services')
     ->hintIcon('heroicon-o-information-circle', 'Ignorez cette étape si vous ne souhaitez pas associer de service au bénévole.')
     ->hintColor('primary')
     ->addActionLabel('Ajouter un service au bénévole')
     ->reorderableWithDragAndDrop(false)
     ->collapsible()
     ->defaultItems(0)
     ->itemLabel(fn(array $state): ?string => Service::find($state['service_id'])->serviceType->name ?? null)
     ->deleteAction(fn(Action $action) => $action->requiresConfirmation())
     ->schema([...]),


Thanks for your help.
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

addaction - refresh repeater
FilamentFFilament / ❓┊help
14mo ago
Moving Filament Repeater addAction to Actions Toolbar
FilamentFFilament / ❓┊help
10mo ago
Repeater : Grouping items
FilamentFFilament / ❓┊help
2y ago
Reordering repeater items
FilamentFFilament / ❓┊help
2y ago