From 718e8c59090047a38f7494d6bd9fbd4890032a45 Mon Sep 17 00:00:00 2001 From: Debbie Matthews Date: Fri, 15 Sep 2023 13:14:34 -0700 Subject: [PATCH 1/3] Create widget.radio_empty.py --- python/api-examples-source/widget.radio_empty.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/api-examples-source/widget.radio_empty.py diff --git a/python/api-examples-source/widget.radio_empty.py b/python/api-examples-source/widget.radio_empty.py new file mode 100644 index 000000000..5ed00605c --- /dev/null +++ b/python/api-examples-source/widget.radio_empty.py @@ -0,0 +1,9 @@ +import streamlit as st + +genre = st.radio( + "What's your favorite movie genre", + [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"], + index=None, +) + +st.write("You selected:", genre) From b7eafa5e0665b52558974832ae187b50e27e2524 Mon Sep 17 00:00:00 2001 From: Debbie Matthews Date: Fri, 15 Sep 2023 14:24:17 -0700 Subject: [PATCH 2/3] Use st.rerun in embedded apps --- python/api-examples-source/forms.form_process3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/api-examples-source/forms.form_process3.py b/python/api-examples-source/forms.form_process3.py index cb3a1d3c6..a4e1c157c 100644 --- a/python/api-examples-source/forms.form_process3.py +++ b/python/api-examples-source/forms.form_process3.py @@ -18,4 +18,4 @@ # a second rerun when the form is submitted to update the value above. st.session_state.sum = a + b if submit: - st.experimental_rerun() + st.rerun() From 6810b9c25bdf120640534dcb139a0a53dc69164c Mon Sep 17 00:00:00 2001 From: Debbie Matthews Date: Fri, 15 Sep 2023 14:47:36 -0700 Subject: [PATCH 3/3] Add placeholder to st.number_input example --- python/api-examples-source/widget.number_input_empty.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/api-examples-source/widget.number_input_empty.py b/python/api-examples-source/widget.number_input_empty.py index d43d8961a..ff8b5bc9f 100644 --- a/python/api-examples-source/widget.number_input_empty.py +++ b/python/api-examples-source/widget.number_input_empty.py @@ -1,4 +1,4 @@ import streamlit as st -number = st.number_input("Insert a number", value=None) +number = st.number_input("Insert a number", value=None, placeholder="Type a number...") st.write("The current number is ", number)