streamlit-tags
streamlit-tags copied to clipboard
Tags does not get updated upon button click event
I am trying to update the tags upon a button click event but the tags are not getting updated.
I have a list of tags that I define at the start and then upon clicking the button this list gets updated but st_tags
component does not update the tags. Below is the script I am using:
import streamlit as st
from streamlit_tags import st_tags
tags = ['hello', 'world']
options = ['hey', 'hi']
add_button = st.sidebar.button("SUBMIT")
if add_button:
tags = ['hello', 'python']
custom_keywords = st_tags(
label="",
text="Press enter to add more",
value=tags,
suggestions=options,
maxtags=15,
key="1",
)
st.multiselect
does update the options upon clicking the button.
original_keywords = st.multiselect(
"Choose a word",
options,
tags,
)
Any way I can achieve this with st_tags
? 😄
Thanks in advance!
Hello, Yes it can be done I will include it in the coming release
Hello, Yes it can be done I will include it in the coming release
That would be great to have!
Any workaround for now? I am pretty new to streamlit
😄
Hi, So the tags that are supplied cannot be changed as it takes static input only because the tags we provide are just starting points since we have a manual input method the I choose not to have it updated every time to maintain the stability of streamlit-tags
To do something like this we can input them manually from the UI.
Any updates on this?