Skip to content

Commit

Permalink
Merge pull request #1032 from umbraco/bugfix/fix-hiding-of-section-na…
Browse files Browse the repository at this point in the history
…vigation
  • Loading branch information
nielslyngsoe authored Dec 1, 2023
2 parents ec08325 + 0796818 commit 7caf64b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class UmbSectionMainViewElement extends UmbLitElement {
}

#renderDashboards() {
return this._dashboards.length > 0
// Only show dashboards if there are more than one dashboard or if there are both dashboards and views
return (this._dashboards.length > 0 && this._views.length > 0) || this._dashboards.length > 1
? html`
<uui-tab-group slot="header" id="dashboards">
${this._dashboards.map((dashboard) => {
Expand All @@ -121,7 +122,8 @@ export class UmbSectionMainViewElement extends UmbLitElement {
}

#renderViews() {
return this._views.length > 0
// Only show views if there are more than one view or if there are both dashboards and views
return (this._views.length > 0 && this._dashboards.length > 0) || this._views.length > 1
? html`
<uui-tab-group slot="navigation" id="views">
${this._views.map((view) => {
Expand Down

0 comments on commit 7caf64b

Please sign in to comment.