Skip to content

Commit

Permalink
Merge pull request #285 from puzzledmonkey/master
Browse files Browse the repository at this point in the history
Auto-hide tabs when there are no visible fields inside
  • Loading branch information
marcfil authored Sep 9, 2024
2 parents 08fa871 + c16bd33 commit f8fea2a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/css/field.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/field.js": "/js/field.js",
"/css/field.css": "/css/field.css"
}
}
3 changes: 3 additions & 0 deletions resources/js/components/FormTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
>
<a
v-for="(tab, key) in getSortedTabs(tabs)"
v-show="hasVisibleFields(tab)"
:key="key"
:class="getIsTabCurrent(tab) ? 'active tabs-text-' + getCurrentColor() + '-500 tabs-font-bold tabs-border-b-2 tabs-border-b-' + getCurrentColor() + '-500' : 'tabs-text-gray-600 hover:tabs-text-gray-800 dark:tabs-text-gray-400 hover:dark:tabs-text-gray-200'"
:dusk="tab.slug + '-tab'"
Expand Down Expand Up @@ -73,6 +74,8 @@
:via-relationship="viaRelationship"
:via-resource="viaResource"
:via-resource-id="viaResourceId"
@field-shown="fieldShown"
@field-hidden="fieldHidden"
@field-changed="$emit('field-changed')"
@file-deleted="$emit('update-last-retrieved-at-timestamp')"
@file-upload-started="$emit('file-upload-started')"
Expand Down
Loading

0 comments on commit f8fea2a

Please sign in to comment.