Hi,
I am facing an issue with st.multiselect widget. st.multiselect not working as expected inside streamlit form st.form. After selecting multiple options through the multi select element, on form submission, the multiselect widget giving empty value.
import streamlit as st
with st.form(key="async_testing_config"):
# Components : Select async api endpoints for testing.
components = st.multiselect(
"Select async api endpoints",
external_call_to_aws_api_to_get_list_of_endpoints(),
key="components"
)
# Submitted - BOOLEAN
Submitted = st.form_submit_button("Submit")
if Submitted:
print("endpoints: ",components)
I’m using
- streamlit 1.28.2 (running on localhost)
- Python 3.9
Highly appreciate any critical/helpful information on this issue!!
Thank you!