Creating a UI component that can update itself
I want to create a batch element, where a drop-down lets the user configure the content of the batch elements, such as having additional features revealed if choosing to do so by the user. For that to work, I need to re-run the cell that generates the batch element. Is there a method to re-run the same cell? I was thinking I could use states to trigger this, but if states are set from the same cell, they dont trigger an update. I couldn't find any documentation about this type of reactivity, as it seems cells can only trigger other cells and not themselves.
Solution:Jump to solution
Yea, use
allow_self_loops=True
in the mo.state
constructor.
```python
import marimo
...2 Replies
Solution
Yea, use
allow_self_loops=True
in the mo.state
constructor.