TableHeaderActions

I have a simple TableHeaderActions within a Table livewire component:
protected function getTableHeaderActions(): array
{
return [
Action::make('create')
->button()
->label(__('Create'))
->icon('heroicon-s-plus')
->visible(auth()->user()->can('core_create_field_type'))
->form($this->getFormSchema())
->action(function (array $data) {
ray($data);
}),
];

protected function getTableHeaderActions(): array
{
return [
Action::make('create')
->button()
->label(__('Create'))
->icon('heroicon-s-plus')
->visible(auth()->user()->can('core_create_field_type'))
->form($this->getFormSchema())
->action(function (array $data) {
ray($data);
}),
];

$this->getFormSchema() returns an array of form's fields. When I click the button, the loading indicator is shown, but no modal opens, did I miss smth ?
3 Replies
David Vincent
David Vincent16mo ago
Don't know if there is an impact, I forgot to mention that this Table livewire is loaded within a View form component
Dan Harrin
Dan Harrin16mo ago
tables dont work within forms though i think because html doesnt allow nested <form> elements
David Vincent
David Vincent16mo ago
Thanks Dan