Is it possible to make relationship tabs vertical?
I have a MemberResource with 27 relation managers. By default these are tabs shown at the top of the page that can be scrolled left and right since they overflow beyond the screen width. However our internal team work with mice that don't have horizontal scroll π, so I'd like to make the tabs vertical down the right of the page.
I can see that ->vertical() exists when you are building tabs from scratch, but is it possible to implement on these relationship tabs? https://filamentphp.com/docs/4.x/schemas/tabs
9 Replies
Hi Keiron, is that what ur looking for ? : https://filamentphp.com/docs/4.x/resources/managing-relationships#setting-the-position-of-the-form-tab
I tried it but no joy. I am not sure what a 'form tab' is. The tabs I'm talking about are the tabs shown on my MemberResource that link to all relationships set up for that resource.
The relation managers are built in
getRelationManagersContentComponent()
. You'd need to overwrite that method on pages to make them verticalAlternatively check out Relation pages ... That would require a little extra work on your end, but it is (imho) the cleaner approach any way π€
A quick look at this tells me that this method just returns an array of the relationships and does not contain the logic for the display portion. I will try and trace through the code and find where the actual display portion is generated.
Thanks, I will take a look
Not sure which method you looked at, but this returns a
Component
In this example I added RMs into form tabs
https://github.com/wiremodel/simple-blog/blob/v4/relation-manager-form-tabs/app/Filament/Resources/Posts/Schemas/PostForm.php
GitHub
simple-blog/app/Filament/Resources/Posts/Schemas/PostForm.php at v4...
A simple blog example. Contribute to wiremodel/simple-blog development by creating an account on GitHub.

Amazing thank you
It depends. Personally, first I check if Filament provides a native way to do what I need. If it doesn't provide one, I go for a custom component