Grid option to hide row numbers, or show rowIDs in their place (#2448)
## Context It has been requested multiple times to allow hiding row numbers (#220, #1927). Also, since rowIDs are used in references, it is sometimes very useful to show rowIDs (possible today by adding a formula column with `$id` formula, but not at all discoverable). ## Proposed solution This PR adds a new "Row numbers" setting on grid widgets to choose what the row-header gutter shows: - Numbers (default): 1-based position in the current sort, as before. - Row IDs: the record's rowId, bracketed like "[15]" to match how references render row IDs; the corner shows an "ID" header label. - Hidden: the gutter collapses entirely. The setting is offered in the widget panel's Grid Options and from a new menu in the grid's top-left corner, revealed on hover like the row-header menu toggles, with a green tick on the active mode. When the gutter is hidden, the toggle sits over the left edge of the first column header. The gutter's width and border are driven by --row-num-width and --row-num-border CSS variables on the grid pane, so frozen columns, scroll shadows, and print layout follow along. Note: implementation also moves FormConfig's `obsPropWithSaveOnWrite` to a shared module (addressing a TODO there), in order to reuse it for the new option, and switches a few other old-style options to it. ## Related issues #220 (Missing option to hide the row id column) #1927 (Hide line numbers in tables) ## Has this been tested? <!-- Put an `x` in the box that applies: --> - [x] 👍 yes, I added tests to the test suite - [ ] 💭 no, because this PR is a draft and still needs work - [ ] 🙅 no, because this is not relevant here - [ ] 🙋 no, because I need help <!-- Detail how we can help you --> ## Screenshots / Screencasts <img width="959" height="280" alt="Screenshot 2026-07-04 at 21 00 50" src="https://github.com/user-attachments/assets/9b1b57fb-245c-4d7f-a365-14168526f0ec" /> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
D
Dmitry committed
398e9743835f612350a57fc7632ec51ef8212106
Parent: b903e21
Committed by GitHub <noreply@github.com>
on 7/21/2026, 2:27:05 PM