gagan3012 / streamlit-tags

Custom Tag component for streamlit
https://streamlit-tags.readthedocs.io/en/latest/
MIT License
281 stars 17 forks source link

Any plans on tags in expander? #35

Open Changwanseo opened 2 years ago

Changwanseo commented 2 years ago

Thanks to this streamlit component, now I've been able to get list inputs in a fashionate form. However, the problem is that my project needs to get 51 options in total, so I put all inputs in expander. But I found that usage such as expander.st_tags_sidebar() is not possible.

It would be great if tags can be used in expander

Socvest commented 2 years ago

You could put it in a with statement:

with st.expander():
       st_tags_sidebar()
      ....
Rom1deTroyes commented 1 year ago

I can confirm that it works with with :

    with st.expander("exp", True):
        st.header("HeaderE")
        st.markdown("-----")
        selection_codes_articles = st_tags(
                label="Articles à chercher E:",
                text="(Code + Entrée pour ajouter)",
                value=["12345-01"],
                suggestions=["12345-01"],
                maxtags=-1,
                key="ArticlesE",
        )
        btn = st.button('->E')

image