Repository navigation
A patch for the minor findings from the 0.5.1 and 0.6.0 reviews. No API changes.
Fixed
- A negative or non-finite total, such as an API's -1 for unknown, counts as no total: the footer shows the page's own range and leaves out "Page N of M". 0.5.1 read a negative total as one page, while the range still said "Showing 0-0 of -5 results". A total that arrives as a numeric string, as node-postgres returns
count(*), still counts as its number. - A table where every column is pinned (
alwaysVisible) no longer shows a settings button that opens an empty panel. - In a table rendered into a popout window or an iframe, a drag now ends when you release the mouse anywhere in that window, and it clears text selection there rather than in the main page. Before, a release off the rows left the drag active, and a later release on a row selected a range.
- The column id warning names a column without a header by its position ("column 4.1"), and reports an id that isn't a string as "Not a string" instead of "Missing".
Docs
- A Shift range or a drag calls
onToggleRowonce for each row it changes, in a single event. If you keep the selection in your own state, update it from its previous value (setSelected(prev => ...)).useTableSelectionalready does. usePaginationenables Next from the total, so it needs the real one. With an unknown total, useuseCursorPaginationfor a cursor API, or build thepaginationprop yourself.