F
Filamentβ€’2w ago
keiron

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
keiron
keironOPβ€’2w ago
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.
Dennis Koch
Dennis Kochβ€’2w ago
The relation managers are built in getRelationManagersContentComponent(). You'd need to overwrite that method on pages to make them vertical
dissto
disstoβ€’2w ago
Alternatively check out Relation pages ... That would require a little extra work on your end, but it is (imho) the cleaner approach any way πŸ€“
keiron
keironOPβ€’2w ago
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
Dennis Koch
Dennis Kochβ€’2w ago
Not sure which method you looked at, but this returns a Component
LeandroFerreira
LeandroFerreiraβ€’2w ago
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.
No description
keiron
keironOPβ€’2w ago
Amazing thank you
LeandroFerreira
LeandroFerreiraβ€’2w ago
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

Did you find this page helpful?