streamlit-option-menu icon indicating copy to clipboard operation
streamlit-option-menu copied to clipboard

Visual bug if used with st.chat_input

Open Daniel-Fauland opened this issue 1 year ago • 3 comments

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")

Daniel-Fauland avatar Nov 11 '23 18:11 Daniel-Fauland

I can see that a PR is referenced here but the problem doesn't seem to be fixed

yanhong-zhao-ef avatar Feb 23 '24 08:02 yanhong-zhao-ef

Yes, this still appears to be an issue. @Joao-Alves @blipk @victoryhb @fgdvir are there any plans to fix this?

ishaan-mehta avatar May 15 '24 19:05 ishaan-mehta

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

ishaan-mehta avatar Jul 30 '24 17:07 ishaan-mehta