NavMenu will highlight child paths with the same name even if it is not at the app's root path.
To Reproduce
NavMenu is set to the following paths:
"/" for "Home"
"/settings" for "Settings"
For most of the app, Home will be shown as highlighted which is fine.
If the current path is a child of /settings such as /settings/path/to/page then Settings is highlighted, this is also fine.
The problem occurs when you have a path that contains the same text as one of the NavMenu item such as /path/to/settings which is not a child path of Settings but will show Settings as highlighted because it contains Settings in the path.
Expected behaviour
I think the intended behaviour in this case should be that Home is highlighted since this is not a child path of Settings.
Contextual information
Packages and versions
@shopify/app-bridge-react @ 4.1.3
Platform
OS: N/A
OS Version: N/A
App: Firefox, Chrome
Additional context
My app is using React with the App Bridge React library.
Describe the bug
NavMenu will highlight child paths with the same name even if it is not at the app's root path.
To Reproduce
NavMenu is set to the following paths:
For most of the app, Home will be shown as highlighted which is fine.
If the current path is a child of
/settings
such as/settings/path/to/page
then Settings is highlighted, this is also fine.The problem occurs when you have a path that contains the same text as one of the NavMenu item such as
/path/to/settings
which is not a child path of Settings but will show Settings as highlighted because it contains Settings in the path.Expected behaviour
I think the intended behaviour in this case should be that Home is highlighted since this is not a child path of Settings.
Contextual information
Packages and versions
@shopify/app-bridge-react
@4.1.3
Platform
Additional context
My app is using React with the App Bridge React library.