I am building a Streamlit component with multiple buttons that each have different inputs. Currently, I differentiate what each button does by specifying a key
on the python side, which is then read in the MyComponent.tsx
script. I am trying to figure out how to pass information from one button to the next.
Specifically, one of the buttons outputs a Blob
object that I can read in the console, however, when I try to save it & display it on the python-side, the Blob
structure is lost and I just get an empty dict {}
. I tried saving the blob in the global state in typescript, as well as in window
, but when I then add inputs to a text field (which are required for the second button), the app resets and the blob object is lost. Is there a way to store this object across session states from the typescript side? Alternatively, is there an efficient way of sending it to some cloud storage and then retrieve it (in the same Blob
format)?