data_editor_enhance API#
data_editor_enhance has the same small eager-data, editable-column, and
edited-value contract as exp_data_editor. Its additional wrapped_columns
option enables the experimental rough resize strategy adapted from marimo's
feat/data-editor-wrap branch.
It accepts the same dataframe-like, scalar, record, and column-oriented inputs
as marimo.ui.data_editor, plus its documented label, on_change,
column_sizing_mode, pagination, and page_size options. Edited values are
synchronized as row dictionaries for AnyWidget.
import marimo as mo
from lumut import data_editor_enhance
editor = mo.ui.anywidget(data_editor_enhance(
[{"notes": "Resize this wrapped column."}],
editable_columns=["notes"],
wrapped_columns=["notes"],
max_row_height=160,
))
On column resize, the widget measures only the visible rows plus a 20-row buffer. On pointer release it reuses the sampled maximum for all rows. This is bounded and responsive, but it is not exact; do not use it for million-row datasets or content-fit layout requirements.
Bases: AnyWidget
Edit tabular data with Glide Data Grid and approximate wrapped heights.
This is deliberately separate from :class:lumut.ExpDataEditor. It carries
the experimental Glide strategy from marimo's feat/data-editor-wrap:
when a wrapped column is resized, it estimates the maximum height in the
visible window (plus a small buffer), temporarily applies it there, then
applies that sampled height to all data rows when the pointer is released.
The method avoids measuring every row during a resize, but it is not exact: rows outside the sample can be too tall or too short. Glide's variable-row callback also has poor scroll-geometry characteristics for huge datasets, so this widget is for experimentation and small-to-medium eager data only.