Documentation needed around manipulating st.text_input elements
See original GitHub issueI couldn’t find on the docs how to reset a st.text_input
.
By reset, I mean the user fill the text_input
, do other things… And when clicking a “Finish” button, the text_input
is reset to its default value.
How can I achieve this ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
st.text_input - Streamlit Docs
st.text_input displays a single-line text input widget. ... supports the following elements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.
Read more ><input type="text"> - HTML: HyperText Markup Language | MDN
<input> elements of type text create basic, single-line inputs. You should use them anywhere you want the user to enter a single-line value...
Read more >Labeling Controls | Web Accessibility Initiative (WAI) - W3C
Provide labels to identify all form controls, including text fields, checkboxes, radio buttons, and drop-down menus. In most cases, this is done by...
Read more >TextInput - React Native
TextInput. A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, ...
Read more >type - Cypress Documentation
The text to be typed into the DOM element. Text passed to .type() may include any of the special character sequences below. These...
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
Hey @Colanim
Here’s a workaround that will allow you to reset the widget value without using an empty space as the value. It also works OK in the sidebar.
We’ll be using a
SessionState
class which is kind of a hack at the moment. Find the code forSessionState
at this gist, https://gist.github.com/tvst/036da038ab3e999a64497f42de966a92We’re currently working on some ideas on how to improve this!
Was this solved? I wanted the clear the input_text() area for a chatbot after the response is received. Does someone know how to do that?