Rows
RowRecord
Each row is a RowRecord — a thin wrapper around a HashMap<String, String>
with a numeric ID:
Row height
All rows share the same height (model.row_height), set at creation time:
Uniform row height enables O(1) row lookup: row_index = floor((y - header_height) / row_height).
Row number gutter
A sticky column on the left displays row numbers (1-based). The gutter width auto-adjusts based on digit count:
Row hover
SetHoveredRow highlights the row under the cursor:
The hover color is controlled by --rs-grid-row-hover-bg (default: semi-transparent overlay).
Alternating row backgrounds
Odd rows use the row_alt_bg theme color for subtle zebra striping.
Customize with --rs-grid-row-alt-bg.
Row count limits
Row indices are u64 (not usize), supporting up to ~9×10^14 rows
with full f64 precision. On WASM32, usize is only 32 bits (4 GB),
which is why row indices use u64 throughout.
Beyond ~9×10^14 rows, f64 precision degrades (consecutive integers become indistinguishable). The hit-testing code uses a precision-preserving decomposition to mitigate this at extreme scroll positions.