streamlit-ext icon indicating copy to clipboard operation
streamlit-ext copied to clipboard

ste.button possible? (not for download)

Open AliciaGro opened this issue 2 years ago • 1 comments

Hello again, and thanks for all your work! I would like to ask you if it's possible to use a normal button with streamlit-ext, I really need use it to copy a dataframe to clipboard, but everytime I do it with a normal st.button the whole page is reloaded.

something like this:

if ste.button('Copy to clipboard'):
            df.to_clipboard(excel=True, index=False)

Could it be possible?

AliciaGro avatar Feb 11 '23 11:02 AliciaGro

Yes, I think it is possible. But it will cause some side effect beyond your use case so I do not implement it.

If a button can remember it's states, it will work like a check box indeed, maybe worse, you can not 'uncheck' it.

PaleNeutron avatar Feb 11 '23 13:02 PaleNeutron