How to adjust columnSpan for Relation Manager?

How do I adjust the columnSpan/columns for a Relation Manager table? I currently have a Relation Manager appear below a resource form. I am also using SubNavgiationPosition::Start. As the Relation Manager doesn't sit within the Group/Section schema of the resource, it expands beyond resource form above.
No description
15 Replies
krekas
krekas6mo ago
if you want to show relation manager near attachements for example then you can't
hayvern
hayvern6mo ago
The current position of the Relation Manager in my screenshot is acceptable. I just want to control the span of the Relation Manager table to be smaller in width (in accordance to the columns used by the Resource form).
Vp
Vp6mo ago
Did you change your resource maxWidth?
hayvern
hayvern6mo ago
For the panel yes, I've set maxContentWidth('Full')...
krekas
krekas6mo ago
your form isn't in full width i would guess
Vp
Vp6mo ago
I don't know the solution for your actual question, but do you still want "relation-manager" to display below (edit/view) form if you use sub-navigation? For me I put it out like this demo https://demo.filamentphp.com/blog/posts/1 And the UI are better IMO
hayvern
hayvern6mo ago
Unfortunately for my use case, I need the sub-navigation to appear because I want to control canEdit on policy for users so they can't edit the ticket. Ofcourse, I can change the design and get rid of sub-navigation (use headerActions instead) and resize the forms (small headache) so that it looks right. But, seems odd that a Relation Manager which is a table and the width cannot be resized... somehow.
krekas
krekas6mo ago
but your form isn't in full width now right?
hayvern
hayvern6mo ago
I've scoped the Group/Section schema with ->columns(4). The section on the left is 3 columns wide and the sections on the right are 1 column wide.
No description
krekas
krekas6mo ago
that doesn't answer the question
hayvern
hayvern6mo ago
I guess, the answer is 'no'.
krekas
krekas6mo ago
try removing columns and i think everything will line properly
hayvern
hayvern6mo ago
I appreciate the suggestion. However, I want the form to look as is currently (if it can be helped). I know that if I remove the columns it will align. But the form is the main working section and so I have hoped the RM can be sized to match without needing to remove the column settings.
krekas
krekas6mo ago
no. table doesn't have any width config. the only way I guess would be to use custom theme
hayvern
hayvern6mo ago
The simplest way is that I just widen the main working section from columnSpan(2) -> columnSpan(3)... this makes things align. So it's not a dealbreaker. Just that all table's width (seems to be) governed by the maxContentWidth() in AdminPanelProvider. IMO it would be good if tables can widths can be adjusted. The coding needed to do this is beyond my current skills and I can only imagine the Filament Team has a good reason for not having this adjustment configurable. Thanks @krekas @Vp for suggestions.