F
Filamentβ€’11mo 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
dyoOPβ€’11mo ago
thanks for the answer.. but i currently working with filament v2..
krekas
krekasβ€’11mo ago
so check docs for v2 then
dyo
dyoOPβ€’11mo 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..
Want results from more Discord servers?
Add your server