Hi, I am using both the latest version of the shopify app-bridge because I want to use the contextual save bar, also I am using older cdn version
I am not using React but custom HTML I am making menu using the app-bridge 3 way
const DashboardLink = AppLink.create(ShopifyApp, {
label: ‘Dashboard’,
destination: ‘/proxy/dashboard’,
});
The menus are created, and it work,s but when I click on other links the other links gets highlighted for a second and the home page gets highlighted
navigationMenu.set({ active: richSnippetLink });
This is not working when I console the navigationMenu I can see the active item is correct but it does not show on the app menu
HomePricingSettings
This creates the menu but still does not highlight the current page
The simplest solution here would be to switch to using the current version of App Bridge for your navigation items since you mentioned you’re already using the latest version for the contextual save bar.
If that’s not possible, you would need to write some custom code to ensure your app’s route and the parent route (the one shown in the URL bar) are in sync. Docs here
Actually its working with Older version as well with this
navigationMenu.set({active: settingsLink});
but since the URL changes it is not able to recognise the current link is there any way we can set active not based on variable but based on the current URL
Like