streamlit-option-menu
streamlit-option-menu copied to clipboard
Is it possible to have pretty URL paths for option menu items?
I'm playing around with the library and I noticed the URLS on mouse over / click are something like
http://localhost:8501/component/streamlit_option_menu.option_menu/index.html?streamlitUrl=http%3A%2F%2Flocalhost%3A8501%2F#
Is there a way to shorten this into something more-readable or less verbose?
e.g.
`http://localhose:8501/abc'
it's a workaround and may not be as nice, but what I've ended up using was to introduce an optional query parameter (accessed via st.experimental_get_query_params()
). If that's set then I set the option_menu(default_index=...)
accordingly.
So I could have urls like: http://host:port?p=page1
As said not the nicest thing, but for now it is good enough for my use-case