Summary
Odd behvaiour with the st.chat_input and the streamlit option menu. The menu option flicks back to the original choice although the page remains changed. See code below to reproduce the result. Any help resolving this would be great. Note that the option menu works fine with st.text_input but when I swap it for st.chat_input the issue arises with the conditional โifโ block.
Steps to reproduce
import streamlit as st
from streamlit_option_menu import option_menu
def main():
#st.set_option('deprecation.showPyplotGlobalUse', False)
st.markdown("Welcome")
# menu for document analyzer apps
summary_type = option_menu(
None,
options=["Q&A", "Summarization", "Compare & Contrast", "Output Parsers", "Admin Panel"],
icons=[
"chat-dots-fill",
"file-earmark-text-fill",
"zoom-in",
"table",
"person-fill-lock",
],
menu_icon="cast",
default_index=0,
orientation="horizontal",
key="main_menu"
)
summary_type
if summary_type == "Q&A":
st.markdown("Page 1")
st.chat_input("Enter your message here")
if __name__ == "__main__":
main()