PaleNeutron / streamlit-ext

Streamlit widgets synce value with url ,download button which won't cause rerun and some useful functions
Apache License 2.0
35 stars 2 forks source link

Is it Possible to Support the on_click Argument for st.download_button? #10

Closed silocydata closed 6 days ago

silocydata commented 9 months ago

What I require is to trigger a function when the user clicks on st.download_button.

The implementation would be like this:

st.download_button( label='title', data=virtual_workbook, file_name=f"BEPChecker_by_turboIFC {timestamp}.xlsx", mime=report_workbook.mime_type, on_click=save_download_event )

If anyone has an idea on how to accomplish this, feel free to reply.

PaleNeutron commented 8 months ago

See here https://github.com/PaleNeutron/streamlit-ext/issues/8