nova-tabs
nova-tabs copied to clipboard
Hide toolbar on relation
Is it possible to hide the toolbar for relation? and how to get rid of the panel border?

Code:
Tabs::make('Product', [
Tab::make('General', [
...
]),
Tab::make('Details', [
HasOne::make('Details'),
]),
Tab::make('Images', [
...
]),
])->withToolbar(),
But if I do like this, nothing changes except the order of the tabs:
Tabs::make('Product', [
Tab::make('General', [
...
]),
HasOne::make('Details'),
Tab::make('Images', [
...
]),
])->withToolbar(),
How did you get a toolbar on a relation? I can't get it done on my end.
The toolbar seems to show as part of the HasOne
relationship.
Can't see it in the other relationships of various types for the same Resource
I'm currently viewing.
I haven't used any morph-type relationships, though. So one equivalent to HasOne
could also have the issue.
Regarding the border -
HasOne
relationships are displayed as individual Resource
s. So, effectively it's showing the pane from the HasOne
Resource
detail page.
This also applies to relationships like HasOne::ofMany()
, as those are also HasOne
relationships.
Edit: Added screenshots as demonstration of a HasMany
vs HasOne::ofMany()
for the same related Resource
.
Apologies for all the blanks. They are screenshots from an internal system under NDA.
HasOne::ofMany()

HasMany

The toolbar seems to show as part of the
HasOne
relationship.Can't see it in the other relationships of various types for the same
Resource
I'm currently viewing.I haven't used any morph-type relationships, though. So one equivalent to
HasOne
could also have the issue.Regarding the border -
HasOne
relationships are displayed as individualResource
s. So, effectively it's showing the pane from theHasOne
Resource
detail page.This also applies to relationships like
HasOne::ofMany()
, as those are alsoHasOne
relationships.Edit: Added screenshots as demonstration of a
HasMany
vsHasOne::ofMany()
for the same relatedResource
.Apologies for all the blanks. They are screenshots from an internal system under NDA.
<summary>HasOne::ofMany()</summary>
![]()
<summary>HasMany</summary>
![]()
Isn't that because you then specified the toolbar should show up on the related resource?
That's correct. If we remove the toolbar from the related resource, it's not visible as part of the HasOne
field.
But in that case, the toolbar will also be missing from the detail view of the related resource, as that's really what the HasOne
relationship shows.
This may or may not be an issue, depending on peoples use-case. Sometimes people may want to show the toolbar with the relationships Actions, and sometimes not (but still be available on its detail page). A bit tricky. Thought I'd try posting what I could, in an attempt to help, though.
Edit: Tried clarifying a bit.