Row action confirmation message is blank

I have a row action to send email, and I need the user to confirm. I have user the ->requiresCofirmation() but the message is blank. Only the two buttons for cancel or proceed are seen with NO TEXT
Action::make('enviarPorEmail')->label('')->tooltip('Enviar por email')
->action( function (Expediente $record) {
$receivers = ['email' => Auth()->user()->email];
$expediente = Expediente::find($record->id);
Mail::to($receivers)->send(new ExpedienteCarpetaEmail ($expediente));
})->requiresConfirmation()
->icon('mail-send-fill'),
Action::make('enviarPorEmail')->label('')->tooltip('Enviar por email')
->action( function (Expediente $record) {
$receivers = ['email' => Auth()->user()->email];
$expediente = Expediente::find($record->id);
Mail::to($receivers)->send(new ExpedienteCarpetaEmail ($expediente));
})->requiresConfirmation()
->icon('mail-send-fill'),
It does not admit ->confirmationMessage() If I establish a label (which I do not want, because only icon must be seen) then it asks "Are you sure you want to do this?" + label message Any ideas of how to establish the text for the confirmation message without a label? Thank you
No description
No description
Solution:
@Albert Lens use ->hiddenLabel() instead of ->label('')
Jump to solution
4 Replies
ericmp
ericmp9mo ago
what is the issue?
Albert Lens
Albert LensOP9mo ago
Id I do not include a label, no message is shown as in image 01
Solution
ericmp
ericmp9mo ago
@Albert Lens use ->hiddenLabel() instead of ->label('')
Albert Lens
Albert LensOP9mo ago
Thank you. When using ->hiddenLabel('some text label') it shows the message, but not the some text label in hiddenLabel. It shows the text inside the make.
Action::make('This text will be shown in the confirmation message')
->hiddenLabel('this label will not be shown in the message or the row')
->tooltip('Enviar carpeta por email')
->action( function (Expediente $record) {
$receivers = ['email' => Auth()->user()->email];
$expediente = Expediente::find($record->id);
Mail::to($receivers)->send(new ExpedienteCarpetaEmail ($expediente));
})->requiresConfirmation()
->icon('mail-send-fill'),
Action::make('This text will be shown in the confirmation message')
->hiddenLabel('this label will not be shown in the message or the row')
->tooltip('Enviar carpeta por email')
->action( function (Expediente $record) {
$receivers = ['email' => Auth()->user()->email];
$expediente = Expediente::find($record->id);
Mail::to($receivers)->send(new ExpedienteCarpetaEmail ($expediente));
})->requiresConfirmation()
->icon('mail-send-fill'),
Now I can achieve what I wanted. Thank you.
Want results from more Discord servers?
Add your server