F
Filamentβ€’12mo ago
wyChoong

using form in tab with relation manager

i have this use case where for a resource with relation manager to display related models in table. now would like to add a Tab to have a form. how can i achieve that?
5 Replies
Patrick Boivin
Patrick Boivinβ€’12mo ago
What would this look like? The main Edit form at the top, then tabs below with the relation manager in tab 1 and second form in tab 2?
wyChoong
wyChoongβ€’12mo ago
Yeah
Patrick Boivin
Patrick Boivinβ€’12mo ago
I think this can probably be done with custom components... Instead of the built-in relation manager, you can add a Tabs container below your Edit form, then use 2 Livewire components: one with a table and one with a form.
wyChoong
wyChoongβ€’12mo ago
I thought about that, but I will have more relation tables than a form in the tab So I thought if have an easier way would be better Maybe in future we can expand the tabs to be TabManager that can take in relation class or component πŸ˜‚
Patrick Boivin
Patrick Boivinβ€’12mo ago
I like this idea! Each relation manager is basically its own Livewire component... maybe you can modify your page template to render the relation managers manually, and mix them in with your custom form? I don't know πŸ˜„
Want results from more Discord servers?
Add your server
More Posts