st.text_input live update parameter
See original GitHub issueProblem
In the following code:
import streamlit as st
text = st.text_input('Name')
text
text
is only being updated when the user presses enter. This goes against the nature of flow of streamlit where users are able to just see the result live.
Solution
Have st.text_input
accept a live
parameter. If the live
parameter is set to true, then the result is changed as the user types the result and does not need to manually input enter.
Additional context
I volunteer to create this PR, as it should be very quick to implement and PR
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:12 (4 by maintainers)
Top Results From Across the Web
st.text_input - Streamlit Docs
Parameters. label (str). A short label explaining to the user what this input is for. The label can optionally contain Markdown and supports...
Read more >InputPath, Parameters and ResultSelector - AWS Step Functions
The Parameters field enables you to pass a collection of key-value pairs, where the values are either static values that you define in...
Read more >TextInput with value doesn't change value - Stack Overflow
first you need to declare the state and then apply that state to TextInput Value. state: ...
Read more >Set text Input text by a button - Power Platform Community
2. On the button click, update the value of the variable and then reset the TextInput like this. UpdateContext({VAR_TI1_Def:"New Text to show ...
Read more >How to Collect user inputs with Streamlit - Part 2 - YouTube
Please try again later. 0:00. 0:00 / 11:14•Watch full video. Live ... Text input. Text input ... Modify the slider. Modify the slider....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@blackary created a text input component that supports live updates 🎉: https://github.com/blackary/streamlit-keyup
Closing this issue as @blackary created a custom component which addresses this need/adding it to the main library would likely cause problems for most users. Feel free to tag us on this issue if you’d like it to be reopened.