You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues for similar feature requests.
I added a descriptive title and summary to this issue.
Summary
I found that enter to submit only works for text entry elements - it doesn't work for:
radio selections
dataframe selections
number inputs
presumably others (selectbox etc.)
Why?
When I test my own forms, which rely on the st.dataframe row selection feature, intuitively I select and press Enter (Return) and expect the form to submit.
Limiting this only to text reduces the usefulness of forms, quite a lot for me
How?
however the text input works -- repeat for all input elements!
Squeezing in the 'Enter to submit' message probably isn't possible, but that's okay.
Additional Context
import streamlit as st
import pandas as pd
test_number = 0
with st.form(key='form_select_step',enter_to_submit=True):
Hey, it does work for st.number_input. I can see the point of having it work for other elements as well but they are definitely a bit less obvious UX since you don't really have a cursor/input field there.
Checklist
Summary
I found that enter to submit only works for text entry elements - it doesn't work for:
Why?
When I test my own forms, which rely on the st.dataframe row selection feature, intuitively I select and press Enter (Return) and expect the form to submit.
Limiting this only to text reduces the usefulness of forms, quite a lot for me
How?
however the text input works -- repeat for all input elements!
Squeezing in the 'Enter to submit' message probably isn't possible, but that's okay.
Additional Context
import streamlit as st
import pandas as pd
test_number = 0
with st.form(key='form_select_step',enter_to_submit=True):
a1,a2,a3,a4 = st.columns([25,25,25,25])
a1.write('Test Radio:')
a1.write(test_radio)
a2.write('Test Dataframe Selection:')
a2.write(test_dataframe_selection)
a3.write('Test Number:')
a3.write(test_number)
a4.write('Test String:')
a4.write(test_string)
The text was updated successfully, but these errors were encountered: