Skip to content

Commit

Permalink
Add title prop to the Navbar component so that overflowMenuLinks comp…
Browse files Browse the repository at this point in the history
…uted property reactively updates when the AppBar title updates
  • Loading branch information
LianaHarris360 committed Feb 12, 2025
1 parent 8f8e488 commit 3d479e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
v-if="links.length > 0"
:class="{ 'hide-navbar': !showTopNavBar }"
:navigationLinks="links"
:title="title"
@update-overflow-count="overflowCount = $event"
/>
</slot>
Expand Down Expand Up @@ -127,6 +128,7 @@
<Navbar
v-if="links.length > 0"
:navigationLinks="links"
:title="title"
/>
</slot>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
return values.every(value => value.link.name);
},
},
title: {
type: String,
required: true,
},
},
data() {
return { mounted: false };
Expand All @@ -92,7 +96,7 @@
return this.navigationLinks.filter(l => !l.isHidden);
},
overflowMenuLinks() {
if (!this.mounted || isUndefined(this.windowWidth)) {
if (!this.mounted || isUndefined(this.windowWidth) || !this.title) {
return [];
}
const containerTop = this.$refs.items.offsetTop;
Expand Down

0 comments on commit 3d479e9

Please sign in to comment.