# This is from the documentation
# https://shopify.dev/docs/api/app-bridge/previous-versions/actions/menu/navigation
const itemsLink = AppLink.create(app, {
label: 'Items',
destination: '/items',
});
const settingsLink = AppLink.create(app, {
label: 'Settings',
destination: '/settings',
});
// create a NavigationMenu with the settings link active
const navigationMenu = NavigationMenu.create(app, {
items: [itemsLink, settingsLink],
active: settingsLink,
});
Previously we don't have issue setting specific nav/menu for our sub pages. The default behavior works when current page is the same or came from the actual nav. However, when we have sub page which is a child of specific nav it's no longer set to active like before.
What I mean above is I did like:
window.navigationMenu = NavigationMenu.create(app, {
items: navItems # array of menu items created using AppLink.create({})
});
# navItem => specific menu item to be activated
window.navigationMenu.set({active: navItem});
That works before, but suddenly not. Unsure if there's some update made with AppBridge etc....
Any help will be much appreciated. Thank you!