leave the modal open after the action

Is it possible to leave the modal open after performing the action? I'm building a chat for orders and this would be a better solution. ->actions([ Action::make('Order chat') ->label('') ->icon('heroicon-o-chat-bubble-left-ellipsis') ->form([ TextInput::make('message') ->label(__('Message')), ]) ->modalContent(view('components.order-chat', ['messages'=>OrderResource::$messages])) ->action(function (array $data, Order $record) { $chatMessage = new OrderChat(); $chatMessage->id_order = $record->id; $chatMessage->id_user = auth()->id(); $chatMessage->content = $data['message']; $chatMessage->save(); }) ])
2 Replies
LeandroFerreira
LeandroFerreira7mo ago
maybe this?
->action(function (array $data, Order $record, Action $action) {
...
$action->halt();
})
->action(function (array $data, Order $record, Action $action) {
...
$action->halt();
})
adryjan
adryjanOP7mo ago
Thanks bro!!!
Want results from more Discord servers?
Add your server