A fix release. No signatures changed, so 0.4.0 is a drop-in for 0.3.0 — but four things the
documentation promised and the code did not actually do now work, so the table may behave in ways
your 0.3.0 workarounds were compensating for. Those two cases are called out below.
implementation("io.github.stephenwanjala:datatable:0.4.0")Sorting cycles past ascending
Clicking a header in 0.3.0 always sorted ascending, however many times you clicked it. The
click handler captured the sort state from its first composition and never saw an update, so the
cycle logic always compared against an empty SortState.
Clicking now cycles ascending → descending → none. Multi-sort with Ctrl+click was stuck
the same way and is fixed with it.
onSortChange, remove that — you
will now get the inversion twice.
Keyboard navigation works at all
The table never took focus, so no key event ever reached it and every shortcut was dead in every
release to date. It now requests focus when clicked, and arrow keys, Home,
End, Enter, and Space behave as documented.
Focus is taken on click rather than on appearing, so a table dropped into a form still does not
steal focus from whatever the user is typing in.
Tabbing past a table no longer costs a stop per row
Per-row checkboxes and expand buttons are out of the Tab order. Previously a three-row table with
selection and expansion took eight Tab presses to get past, and a forty-row grid took
eighty. The cost is now fixed regardless of row count.
Both controls stay clickable, and Space on the focused row still toggles selection. The
header select-all checkbox and the pagination controls keep their focus — there is a fixed handful
of them, and they are real controls a keyboard user should reach.
Weighted columns have a real width
A column with width = null collapsed to zero inside the horizontally scrolling area, because
Modifier.weight had nothing bounded to take a share of. Weighted columns now divide up the
viewport minus the fixed columns, the leading controls, and any frozen section, with
minColumnWidth as the floor when the fixed columns already overflow.
wider — and visible — weighted columns where they previously rendered nothing.
Also in this release
- A test suite covering sorting, selection, pagination, keyboard navigation, tab order, column
widths, and header-tree validation. The sort-cycle bug above is the one it found first. - Built against Compose Multiplatform 1.11.1, up from 1.9.2. Compose is an
apidependency, so
Gradle will resolve your project's Compose artifacts up to 1.11.1 unless you constrain them. - The documented requirements were wrong and are now correct. The artifact targets Java 11,
not the "JVM 21+" the docs claimed; Kotlin metadata is emitted at language level 2.2. Nothing
about the published bytecode changed — only the claim about it. - Documentation: keyboard shortcuts render as keycaps instead of literal
++ctrl++text, and
the site now states plainly
what the table does not do —
cell editing, cell selection, clipboard, filtering, export, column reordering, layout
persistence, tree tables, and accessibility semantics are all absent. - Demo packages for the sample gallery are attached below.
Links
Full Changelog: 0.3.0...0.4.0