How to find something like a "selectedLabel" tag for Navigation items?

I want the pages to auto title themselves based on the Item selected in a retool navigation component. I can easily find and load these from a tabbed navigation bar but not from the standard navigation bar. Can someone help me determine how to do something/locate something like this for the standard navigation component? (pictured is the state of a tabbed nav with the "selectedLabel")

I would think you could still get the standard navigation bar value and populate it in the App settings:
Screenshot 2023-08-03 at 1.53.25 PM

selectedItem doesn't show up in the state value for regular navigation elements. The previous post had an image for the tabbed nav but I'm not seeing selectedItem for normal navigation. In this post I have provided what I see when I look at the state. It doesn't show a selectedItem.

I'm thinking I may have to use a custom even handler if I want to use the normal nav because it's a more powerful component...

You may need to, when clicking on the navigation link in the nav component, pass a URL parameter for the app to read and then take that param and use it in the app settings as I noted above.

Hi @clarke,

Not sure if this helps your case, but you can maintain a selected item in the navigation with the highlight property that is exposed on the "Custom" option.

You could reference the index of the highlighted item in order to get the selected label:

1 Like