streamlit-option-menu
streamlit-option-menu copied to clipboard
Visual bug if used with st.chat_input
If you use streamlit_option_menu and st.chat_input is used in one of the options there is a visual bug where you have to press the tab twice before you switch to the right page/tab.
import streamlit as st
from streamlit_option_menu import option_menu
selected2 = option_menu(None, ["Home", "Upload", "Tasks"],
icons=['house', 'cloud-upload', "list-task", 'gear'],
menu_icon="cast", default_index=0, orientation="horizontal")
if selected2 == "Home":
if prompt := st.chat_input("Enter your text"):
st.chat_message(prompt)
elif selected2 == "Upload":
st.write("Upload")
elif selected2 == "Tasks":
st.write("Tasks")
I can see that a PR is referenced here but the problem doesn't seem to be fixed
Yes, this still appears to be an issue. @Joao-Alves @blipk @victoryhb @fgdvir are there any plans to fix this?
This bug means that the core visual cues that one would expect from an option menu are nonexistent for any apps using a chat input — is there any idea how to fix this or any workarounds? I would love to keep using this package.
@victoryhb