Dismissing an ActionGroup Menu in Action #5212
-
Is there a way to dismiss/close the ActionGroup menu after clicking an Action within that ActionGroup? After I click my Action, the ActionGroup menu stays visible. This is my code: Pages\Actions\ActionGroup::make([
Pages\Actions\Action::make('checkin')
->label('Check In')
->icon('heroicon-o-clipboard-check')
->color('secondary')
->action(function (): void {
$this->record->update(['arrived_at' => now()]);
Notification::make()
->title('The registrant has been checked in.')
->success()
->send();
}),
}), |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I was able to add this to the Action to get this to work: ->extraAttributes(['x-on:click' => 'toggle']) |
Beta Was this translation helpful? Give feedback.
-
I had this same issue today and found my own issue - there has to be a better way to accomplish this? It feels like it should happen automatically honestly. Anyone have any ideas? |
Beta Was this translation helpful? Give feedback.
-
I usually do it this way: ->hidden(
fn() => ($this->record->order_status == 'new') ? false : true
), This is reactive and persistent even when the page is refreshed. |
Beta Was this translation helpful? Give feedback.
I was able to add this to the Action to get this to work: