Skip to content

v0.2.0

Choose a tag to compare

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

The table used to ignore the height it was given. It returned maxVisible rows plus a header and an indicator whatever the terminal was, so at stty rows 10 a table built for 15 rows produced 17 lines and pushed its own header off the screen. The layout engine pads short output but never trims long output, so staying inside the height is the widget's job. That is fixed, and expandVertically(true) goes further: the table takes the height the layout gives it and shares the screen with a status line or a hint. It is off by default. While expansion is on, maxVisible is ignored rather than acting as a ceiling — a table quietly showing ten rows after you asked it to fill the screen is the worse surprise.

setEmptyText() and setNoMatchText() replace the two hardcoded English lines, so a table in a Russian interface stops saying "No rows". getColumns() and getVisibleRowCount() hand back state the widget already had: without them a caller rebuilds its own map of keys to headers, and catches the row count from FilterChangeEvent to keep it in a variable.

setMaxVisible() changes the fixed window after construction. Paging now moves by the window that was last drawn, not by maxVisible, which only matters once the height comes from the layout.

Upgrading from 0.1.x needs no changes: everything here is additive, and the height cap only removes lines that were overflowing the terminal anyway.