Problem with Custom Form-Field Table in Filament Resource Form
I need some help with an issue I'm facing in a Filament resource form where I need to include an editable table. I know I can add a relationship table at the bottom of the form, but the client requested that the table be part of the form itself.
To achieve this, I created a custom form field and embedded a Livewire component in the form-field Blade file that contains a table.
custom form-field in Resource Form:
form-field blade file:
Livewire table:
Everything seems to work, but I encountered two issues that I can't resolve:
Has anyone experienced something similar or have any suggestions? I'd really appreciate any help, as I often miss having an editable table directly within a form. It would make managing more complex resources much easier. Thanks!
To achieve this, I created a custom form field and embedded a Livewire component in the form-field Blade file that contains a table.
custom form-field in Resource Form:
form-field blade file:
Livewire table:
Everything seems to work, but I encountered two issues that I can't resolve:
- In the table, actions like adding a new entry, editing, or deleting only work after the second click.
- The "save" button of the parent resource form does not work when the table is part of the form. No error message appears; it simply doesn't respond.
It seems like the resource form is conflicting with the custom field's form.
Has anyone experienced something similar or have any suggestions? I'd really appreciate any help, as I often miss having an editable table directly within a form. It would make managing more complex resources much easier. Thanks!
