Skip to content

v0.1.1

Choose a tag to compare

@stephenWanjala stephenWanjala released this 10 Apr 20:33
· 38 commits to master since this release
bf65396

Release Notes — v0.1.1

New Features

Frozen/Pinned Columns
Columns marked with fixed = true and an explicit width are now pinned to the left edge of the table and remain visible during horizontal scrolling.

Multi-Column Sort
Ctrl+click column headers to sort by multiple columns simultaneously. Use the new multiSortBy and onMultiSortChange parameters alongside the existing single-sort API.

Column Resizing
Enable resizableColumns = true to let users drag column edges to resize. Use minColumnWidth to set a lower bound, and DataTableState.resetColumnWidths() to revert to defaults.

Keyboard Navigation
The table is now focusable and supports Arrow Up/Down to move between rows, Enter to trigger onRowClick, Space to toggle selection, and Home/End to jump to the first or last row.

Selection Modes
A new SelectionMode enum (NONE, SINGLE, MULTI) replaces the implicit multi-select behavior previously tied to showSelect. The showSelect parameter remains for backwards compatibility.

Right-Click Context Menu
New onRowContextMenu: (T, Offset) -> Unit callback fired on right-click, providing the item and the pointer position.

DataTableState
New state holder created via rememberDataTableState(). Supports programmatic animateScrollToItem(index) and resetColumnWidths().

Items-Per-Page Selector
The pagination footer now includes a page-size picker. Configure available options with itemsPerPageOptions and respond to changes via onItemsPerPageChange.


Enhancements

  • Alternating row colors — set colors.rowAlternate for zebra-striped rows.
  • Row hover highlight — set colors.hoveredRow for a mouse-over tint.
  • Focused row border — set colors.focusedRowBorder to highlight the keyboard-focused row.
  • Per-column text overflowDataTableHeader now accepts maxLines and overflow (TextOverflow) to control cell text truncation.
  • Custom sort comparator — set DataTableHeader.comparator to override the default Comparable-based sort for a column.
  • Column visibility toggle — set DataTableHeader.visible = false to hide a column without removing it from the header list.
  • Multi-sort takes precedence over single-sort when both are provided.

Bug Fixes

  • Global row index was not tracked correctly across groups, causing mismatched focus and selection highlights in grouped tables.
  • Horizontal scrollbar was duplicated (rendered for both header and body) when showScrollbars = true and frozen columns were not in use.

Breaking Changes

  • DataTableRow and DataTableHeaderRow now require selectionMode, rowIndex, isFocused, state, and onContextMenu parameters. If you are calling these internal composables directly, update your call sites.
  • TableDivider and enableTrackpadHorizontalScroll are now internal. They were previously private but accessible in the same module — direct external use is no longer supported.
    Full Changelog: 0.1.0...0.1.1