Tooltips not working on Disabled Action Button.

Here is the implementation
DirectPrintAction::make()
->visible(fn ($record) => $record->payment_status !== PaymentStatus::PENDING)
->disabled(function () {
$defaultPrinter = Printer::where('is_default', true)->first();

return ! $defaultPrinter || $defaultPrinter->status === PrinterStatus::OFFLINE;
})
->tooltip(function () {
$defaultPrinter = Printer::where('is_default', true)->first();
if (! $defaultPrinter) {
return 'No default printer set';
}

return $defaultPrinter->status === PrinterStatus::OFFLINE ? 'Please check printer status' : '';
})
->icon('heroicon-o-printer'),
DirectPrintAction::make()
->visible(fn ($record) => $record->payment_status !== PaymentStatus::PENDING)
->disabled(function () {
$defaultPrinter = Printer::where('is_default', true)->first();

return ! $defaultPrinter || $defaultPrinter->status === PrinterStatus::OFFLINE;
})
->tooltip(function () {
$defaultPrinter = Printer::where('is_default', true)->first();
if (! $defaultPrinter) {
return 'No default printer set';
}

return $defaultPrinter->status === PrinterStatus::OFFLINE ? 'Please check printer status' : '';
})
->icon('heroicon-o-printer'),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server