Combine Relationship Manager tabs and form tabs
Is it possible to combine the tab created from hasCombinedRelationManagerTabsWithContent() with the tabs from a form?
Solution:Jump to solution
much better:
```php
Livewire::make(YourRelationManager::class, fn (Page $livewire, YourModel $record) => [
'ownerRecord' => $record,...
10 Replies
I can't access your link, sorry
my bad, this
Yes, I used this and now I have tabs for Edit and the Relations and below this tabs from the form. It would be nice to combine them into a single row.
it could be better, but it should work:
in the RelationManager class, add this:
In the Form tab:
YourModel in the RelationManager refers to target model. For my use case right now this should work, but a more reusable solution would be nice. Thanks so far!
Solution
much better:
and remove the mount method
nice tip btw, I'll create a content about this π
Awesome! Thank you very much! This has the additional benefit of not having a page reload like the hasCombinedRelationManagerTabsWithContent method has
Hey, I'm coming back to this, feeling stupid that I didn't notice it earlier:
1. It is still necessary to load the RelationManager in the resources getRelations method, otherwise I can't create new entries (symfony error not finding the component), but then I have it under each form visible again... bummer.
2. Having this Livewire component in my tabs seems to hijack the form submit process, because nothing happens if i try to edit a form where this Livewire