Skip to content

v0.1.0

Choose a tag to compare

@Bosun18 Bosun18 released this 09 Aug 12:09
· 7 commits to main since this release

First release. A TableWidget for symfony/tui: a header, a scroll window that keeps the selected row centred, and a (current/total) indicator once rows go off screen.

Columns pin a width or take what is left, align left, right or centre, and can format a cell before it is drawn. Sorting is stable, cycles ascending, descending and off on the column under the cursor, and takes a custom comparator when <=> gets it wrong. Filtering takes a string, matched against the text a column displays, or a predicate over the raw row; both run on top of the original array, which is never mutated.

Navigation, selection, sorting and filtering each dispatch an event, and the keybindings can be swapped through the constructor.

Requires PHP 8.4.1 and symfony/tui ^8.1. The upstream component is experimental, so treat the pin seriously. Mouse support waits for mouse events to land in the core.