Get help from the marimo community

Updated 6 months ago

Store output of function called on button click

At a glance

The community member is using a button to call a function that returns a tuple, and they are wondering if there is an existing attribute of the button to access the 'on_click' output, as they did not find anything in the docs. Another community member suggests looking at the examples of accessing the values of buttons in the docs, and also mentions the mo.ui.run_button function which can lazily process downstream cells.

Useful resources
Hi, I'm using a button to call a function that returns a tuple. Is there an existing attribute of the button to access the 'on_click' output? Didn't see anything in the docs.
Attachment
image.png
M
1 comment
There are a few examples of accessing the values of the buttons in the docs:
https://docs.marimo.io/api/inputs/button.html#button

You may also can use mo.ui.run_button which can lazily process downstream cells:
https://docs.marimo.io/api/inputs/run_button.html#run-button
Add a reply
Sign up and join the conversation on Discord