© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•10mo ago•
1 reply
Mombei

$get() scope for Repeater actions

Hello,
I'm trying to customize a Repeater's DeleteAction through the deleteAction() method, and I'm using a closure to configure the $action:

//

Repeater::make('relationshipName')
  ->relationship()
  //other configuration
  ->deleteAction(fn(Action $action) =>  $action->requiresConfirmation(fn(Get $get) => debug($get('*'))));

//
//

Repeater::make('relationshipName')
  ->relationship()
  //other configuration
  ->deleteAction(fn(Action $action) =>  $action->requiresConfirmation(fn(Get $get) => debug($get('*'))));

//

the debug output suggests the $get is scoped to the parent, not the repeater item (which I understand only happens inside the repeater schema itself):

array:5 [▼ 
 0 => null
  1 => 0
  2 => array:13 [▶]
  3 => array:1 [▶]
  4 => array:3 [▼ //repeater items
    "6239daa3-527e-453e-b75f-60c20019f870" => array:6 [▼
   //repeater item fields
   ],
  //other repeater items
  ]
]
array:5 [▼ 
 0 => null
  1 => 0
  2 => array:13 [▶]
  3 => array:1 [▶]
  4 => array:3 [▼ //repeater items
    "6239daa3-527e-453e-b75f-60c20019f870" => array:6 [▼
   //repeater item fields
   ],
  //other repeater items
  ]
]


Is there a workaround, if not an intended method, to access the repeater item fields inside the deleteAction() closure? I would like the deletion to only ask for confirmation if a specific required field within the repeater has been filled.

I have also tried injecting the $get in the first closure and invoking it in the second closure without parameters
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

Repeater actions order
FilamentFFilament / ❓┊help
2y ago
Hydration or scope issue in repeater?
FilamentFFilament / ❓┊help
3y ago
Multiple add actions on repeater
FilamentFFilament / ❓┊help
2y ago
Same repeater , different extra actions
FilamentFFilament / ❓┊help
2y ago