F
Filament14mo ago
dyo

Custom requiresConfirmation() dialog in table Action

Can someone help me with this? And also I want the confirmation button to be customed. When user click the action, there will be a conditional checking, if return true, then the buttons that appear is as usual, ok and cancel. But when return false, I only need 1 button, which is like cancel, but with label close..
5 Replies
dyo
dyoOP14mo ago
thanks for the answer.. but i currently working with filament v2..
krekas
krekas14mo ago
so check docs for v2 then
dyo
dyoOP14mo ago
how could i miss this.. thanks a lot.. 👍 can you help me how to pass a variable from 1 method to another? i've code something like this
->modalSubheading(function ($record) {
$data = Setoran::where('status', 'Unconfirm')
->where('dana', $record->dana)->first();

//
})
->action(function ($record): void {
$setoran_id = ??;

//
->modalSubheading(function ($record) {
$data = Setoran::where('status', 'Unconfirm')
->where('dana', $record->dana)->first();

//
})
->action(function ($record): void {
$setoran_id = ??;

//
i want to use $data at subheading in action method..

Did you find this page helpful?