exp_data_editor API#
exp_data_editor mirrors the intentionally small contract of
marimo.ui.data_editor: supply tabular data, decide which columns are editable,
and read the edited rows from the widget value.
It accepts marimo's documented eager-data forms: dataframe-like inputs,
scalars (shown in a value column), records, and mappings of columns. It also accepts label, on_change, column_sizing_mode, pagination, and
page_size. pagination=True is client-side pagination for eager data. For
large datasets, use pagination="server" with a Python page source, or
pagination="remote" with RemotePageSource when running in Marimo WASM. Passing a
PageSource or RemotePageSource selects its matching large-data mode by default.
import marimo as mo
from lumut import exp_data_editor
editor = mo.ui.anywidget(exp_data_editor(
[{"name": "Ada", "notes": "Text can wrap over multiple lines."}],
editable_columns=["notes"],
wrapped_columns=["notes"],
wrap_text=True,
auto_row_height=True,
max_row_height=160,
))
editor
Server and remote pagination synchronize compact edit patches; they do not eagerly materialize a full editor.value. Remote endpoints must return either a row array or { "rows": [...], "row_count": N } for ?offset=N&limit=N requests, and accept PATCH { "patches": [...] }. Set wrap_text=False
to truncate text in every column, or auto_row_height=False to keep every row at
estimated_row_height; wrapped_columns selects which columns may wrap when
wrapping is enabled.
Bases: AnyWidget
Edit a small-to-medium tabular dataset in any AnyWidget runtime.
The widget mirrors the intentionally small public contract of
marimo.ui.data_editor: it accepts tabular data, controls which columns
may be edited, and synchronizes the fully edited rows through value.
Text rows are measured lazily as they enter the viewport. Heights are
capped by max_row_height so a single long value cannot dominate the
scroll geometry.
Wrap this widget with mo.ui.anywidget in marimo. Its value is then
available through the wrapper's value attribute.
Source code in lumut/exp_data_editor.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |