Plain JavaScript app bridge NavigationMenu can't make home nav item active

Solved

Plain JavaScript app bridge NavigationMenu can't make home nav item active

MartyBoggs
Shopify Partner
9 1 0

Hello,

 

Whenever I run this code, instead of the main navigation item (the app name) being highlighted, the first nav item is highlighted. I tried different versions of the app bridge library at unpkg.com as well as the new CDN version, but it's always the same problem.

 

It was working for about 24 hrs a few days ago, so maybe I should just wait for Shopify to fix the problem.

 

 

 

 

var installLink = AppBridge.actions.AppLink.create(app, {
	label: 'Install',
	destination: '/?status=install',
});
var navigationMenu = AppBridge.actions.NavigationMenu.create(app, {
	items: [installLink]
});
navigationMenu.set({active: undefined});

 

 

 

 

Accepted Solution (1)

MartyBoggs
Shopify Partner
9 1 0

This is an accepted solution.

Looks like the problem was the query parameter destination /?status=install. I changed it to /install

View solution in original post

Reply 1 (1)

MartyBoggs
Shopify Partner
9 1 0

This is an accepted solution.

Looks like the problem was the query parameter destination /?status=install. I changed it to /install