Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual bug if used with st.chat_input #54

Open
Daniel-Fauland opened this issue Nov 11, 2023 · 3 comments
Open

Visual bug if used with st.chat_input #54

Daniel-Fauland opened this issue Nov 11, 2023 · 3 comments

Comments

@Daniel-Fauland
Copy link

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")
@yanhong-zhao-ef
Copy link

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

@ishaan-mehta
Copy link

ishaan-mehta commented May 15, 2024

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

@ishaan-mehta
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants