-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.formRelated to the `st.form` containerRelated to the `st.form` containerfeature:st.multiselectRelated to the `st.multiselect` widgetRelated to the `st.multiselect` widgettype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
Streamlit multi_select element st.multi_select 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 [].
Reproducible Code Example
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("project id: ", project_id)
print("endpoints: ",components)Steps To Reproduce
No response
Expected Behavior
After submitting the form, user should be able to get all options selected through multi select widget.
Current Behavior
User getting empty value after submitting. Note: the options passed to the multiselect widget is an external api call to aws api to list of endpoints (options). I tried with streamlit version 1.28.2 and also latest version 1.29.0 as well, facing the same issue.
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.28.2
- Python version: 3.9
- Operating System: Mac
- Browser: Chrome
Additional Information
No response
github-actions, prathmesh0203, arvind73, HieuNT91, PradeepReddy-epi and 11 more
Metadata
Metadata
Assignees
Labels
feature:st.formRelated to the `st.form` containerRelated to the `st.form` containerfeature:st.multiselectRelated to the `st.multiselect` widgetRelated to the `st.multiselect` widgettype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features