Documentation is
Explain in Detail
The API documentation for UI elements such as mo.ui.text marks the value atrribute as writable, which implies it can be set directly. However, attempting to do so raises a RuntimeError:
import marimo as mo
x = mo.ui.text(label="textfield")
x.value = "hello"
# RuntimeError: Setting the value of a UIElement is not allowed.
# If you need to imperatively set the value of a UIElement, consider using mo.state().
Marimo version 0.20.4
Your Suggestion for Changes
Either:
The value property should be settable as documented, or
The documentation should be updated to remove the "writable" label and clarify that direct assignment is not supported.
Will you submit a PR?
Documentation is
Explain in Detail
The API documentation for UI elements such as mo.ui.text marks the
valueatrribute as writable, which implies it can be set directly. However, attempting to do so raises a RuntimeError:Marimo version 0.20.4
Your Suggestion for Changes
Either:
The value property should be settable as documented, or
The documentation should be updated to remove the "writable" label and clarify that direct assignment is not supported.
Will you submit a PR?