Minor Changes
-
#7
254709dThanks @Psvensso! - Filter panel: a "Filters" header with a close button, Escape and a click outside
to dismiss, and a "Clear all" next to "Add filter", which is now disabled once
every filterable column has a filter.New
TMDataGrid.FilterPills(also exported asTMDataGridFilterPills) — one
pill per active filter,First name: Sofia ✕, with the ✕ clearing that filter
and a click on the label reopening the panel on its column. It takes the grid as
anapiprop instead of reading context, so it can be rendered outside the
grid.formatFilterLabelis exported for building your own. -
#6
9f39544Thanks @Psvensso! - AddrowContextMenutoTMDataGrid.Table: a render prop that fills a Mantine
Menuthe grid opens at the pointer on a right-click or long press. It receives
{ table, row, cell, close }, and returningnullleaves a row without a menu.
rowContextMenuPropspasses through to theMenu. The open row carries
data-context-menu. -
#7
040e4b3Thanks @Psvensso! - Row grouping. Group by X in any column menu collapses the rows into a tree;
the grouped column leaves the grid and a generated Group column takes its
place, pinned beside the checkbox lane, showing each group's value, its record
count and a chevron. Group from a second menu to nest. Ungroup lives on the
tree column's menu, and Expand/Collapse all groups in every column menu. On
by default, off undermanualPagination;enableGrouping: falsedisables it.Aggregation is opt-in — a group row is blank until a column declares an
aggregationFn. A group's checkbox selects every record under it at any depth,
and only the records reachrowSelection.groupingpersists with the settings
slices,expandedwith the data slices.Grouping suspends the built-in pager, which greys itself out rather than
disappearing: a page cannot count both rows and groups without stranding part of
the tree.isPagingActiveis exported for custom pagers.Also fixes a hidden column leaving an empty grid track behind, from the column
tracks being built from all leaf columns while the cells came from the visible
ones. -
#4
f947272Thanks @Psvensso! - AddselectionMode, replacingrowSelectionMode:"checkbox"(the default),
"row","checkboxAndHighlight"and"highlight". The last two introduce a
highlighted row — state of its own, so a checkbox multi-selection and a single
highlighted row can coexist for a detail panel. Row-click selection gains the
usual Ctrl/Shift modifiers, and the select-all box is dropped under
enableMultiRowSelection: false, where it selected every row.Breaking renames:
rowSelectionMode→selectionMode("checkbox"and"row"unchanged)highlightSelectedRows→showSelectedBackgrounddata-highlighted→data-selected-bg;data-highlightednow marks the
highlighted row- New
--dg-row-highlight-bgalongside--dg-row-selected-bg