Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 19:54
cb91f83

Minor Changes

  • #7 254709d Thanks @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 as TMDataGridFilterPills) — 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
    an api prop instead of reading context, so it can be rendered outside the
    grid. formatFilterLabel is exported for building your own.

  • #6 9f39544 Thanks @Psvensso! - Add rowContextMenu to TMDataGrid.Table: a render prop that fills a Mantine
    Menu the grid opens at the pointer on a right-click or long press. It receives
    { table, row, cell, close }, and returning null leaves a row without a menu.
    rowContextMenuProps passes through to the Menu. The open row carries
    data-context-menu.

  • #7 040e4b3 Thanks @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 under manualPagination; enableGrouping: false disables 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 reach rowSelection. grouping persists with the settings
    slices, expanded with 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. isPagingActive is 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 f947272 Thanks @Psvensso! - Add selectionMode, replacing rowSelectionMode: "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:

    • rowSelectionModeselectionMode ("checkbox" and "row" unchanged)
    • highlightSelectedRowsshowSelectedBackground
    • data-highlighteddata-selected-bg; data-highlighted now marks the
      highlighted row
    • New --dg-row-highlight-bg alongside --dg-row-selected-bg

Patch Changes

  • #7 620a739 Thanks @Psvensso! - Fix the checkbox being clipped in the select column at size="xl". The column
    is a fixed 48px track, which the cell padding — 18px a side at xl — left too
    little room for. It no longer takes that padding and centres its box instead.