question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

st.text_input live update parameter

See original GitHub issue

Problem

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:closed
  • Created a year ago
  • Reactions:3
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LukasMasuchcommented, Aug 26, 2022

@blackary created a text input component that supports live updates 🎉: https://github.com/blackary/streamlit-keyup

0reactions
carolinedlucommented, Nov 8, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found