Get updated row selection on modal open

I have a bulk action and want to fill form based on current selection. It works at the first modal open, but after closing modal, update the selection, then click the action again, the $records data is not updated.
BulkAction::make('foo')
->form([
TextInput::make('total_amount')->disabled(),
// ...
])
->fillForm(fn ($records) => [
// $records not updated
'total_amount' => $records->sum('total_amount')
])
->action(fn ($records, $data) => dd($records)) // $records updated
BulkAction::make('foo')
->form([
TextInput::make('total_amount')->disabled(),
// ...
])
->fillForm(fn ($records) => [
// $records not updated
'total_amount' => $records->sum('total_amount')
])
->action(fn ($records, $data) => dd($records)) // $records updated
1 Reply
IndomieRendang
IndomieRendangOP13mo ago
I've opened since september but was tagged as low priority, but considering the case above, I think this is important. For this moment, I expect someone could help me to solve this problem using browser events or anything if possible.
Want results from more Discord servers?
Add your server