Column Dragging
Persist draggable and toggleable column preferences with a browser storage key.
Column Dragging
Persist draggable and toggleable column preferences with a browser storage key.
Source: usage.py::build_column_dragging_code("demo-column-dragging").
table = (
dmdt.DataTable(
id="column-dragging-table",
data=EMPLOYEES[:6],
columns=COLUMN_CUSTOMIZATION_COLUMNS,
paginationMode="none",
)
.update_layout(
radius="lg",
withTableBorder=True,
withColumnBorders=True,
storeColumnsKey="demo-column-dragging",
)
.update_columns(
selector=["team", "role", "location", "salary", "status"],
draggable=True,
toggleable=True,
)
.update_columns(
selector="location",
defaultToggle=False,
)
.update_columns(
selector=["salary", "status"],
visibleMediaQuery="(min-width: 48em)",
)
)