RFC 0080 — A value for the selected rows: one column set for all of them
Status: implemented (2026-11-30) · Target: 0.65.0 · builds on RFC 0077, RFC 0078 and RFC 0079 · see Decisions
Summary
"Mark these 340 overdue invoices as reminded." The user has filtered the list and selected every match (RFC 0077). The table can write many cells (RFC 0079), but only over a range on the page. So the app still writes a bulk action for each column a user might want to set, and most apps don't.
This RFC gives the selection bar that action for every editable column:
All 340 that match are selected. Set ▾ · Clear
- Set in the selection bar: pick an editable column, give its
value in the column's own editor, and Set for 340 rows. It's written
through
oneditrow(oronedit), one row at a time, four at once, with RFC 0079's progress, Cancel and failures. - ⌘Enter in a cell's editor (Ctrl+Enter), on a selected row: the value goes into that column for every selected row, as a spreadsheet does with a selection.
- One step to undo. ⌘Z takes the whole set back, the rows off the page too.
- Nothing new for the app that already edits in the table: the
columns'
edit,editable(row)and the write it has.
Motivation
- The most common bulk change is one field. A status, an owner, a
date, a flag. Each is a bulk action the app writes, a menu item, a
confirm and a loop over ids. With
editon the column, the table knows everything that needs. - Every match is selected for a reason. RFC 0077 made "the 340 that match" one click. Exporting them and sending a reminder are covered; the next thing a user does is change them.
- A range doesn't reach. RFC 0079's fill and paste are over the cells on the page. A selection spans pages, filters and groups, and is what the user already uses to say "these".
Current state (0.67)
selectgives the rows checkboxes.bind:selectedis their keys, kept across pages. The selection bar shows the count, offers every match (RFC 0077), and renders the app'sbulk(selected, clear)snippet.selectedRows()is the selected rows the table has had: every page it showed, and every match it fetched.- A table with a column's
editandoneditoroneditrowis a grid (RFC 0078). RFC 0079's write of many groups changes by row, writes four rows at once, shows progress past 20 rows, and makes one step for ⌘Z. Undo only touches rows that are in the table now. - In a cell's editor, Enter saves and goes down, Tab across, Esc leaves it.
Design
Set in the selection bar
With select, a grid (an editable column and a write), and a selection,
the bar has a Set menu next to the app's bulk:
- The columns: each column with
edit, shown or hidden, by its label. A column no selected row may change (editable(row)false for all of them) isn't offered. - The value: picking one opens a small panel by the button, with the column's editor (RFC 0078's: text, number, date, options, a checkbox for a boolean), empty, and the button Set for 340 rows. Enter sets, Esc closes it. A value that doesn't read is said under the editor, as in a cell.
- Past the page, the user confirms. When the selection has rows that aren't on the page, the table asks first: "Set Status to Paid for 340 rows? 315 of them aren't on this page." A selection on the page is set at once, as a fill is.
- The write: every selected row the table has, whose value isn't
that already, through RFC 0079's write of many. Rows
editablesays no to are left and counted. The rows the table doesn't have (keys inselectedit never saw) are left and counted. - After: the selection stays, so the next step (send, export) is on the same rows. The table says "Set Status for 338 rows. 2 can't be changed."
⌘Enter in a cell
While editing a cell on a selected row, ⌘Enter (Ctrl+Enter) saves the value into that column for every selected row, by the same steps 3 to 5. On a row that isn't selected, or with nothing selected, it's Enter. A boolean cell takes ⌘Space: the selected rows get the cell's new value.
The rows off the page
The rows the table writes are the ones selectedRows() has: as the page
showed them, or as RFC 0077 fetched them for every match.
- The row it gives the write is that one, with the column's new
value. An app whose update takes the whole input (
inputOf(row)) sends the other fields as they were when the row was fetched. The confirm in step 3 is the point where that's the user's choice; an app that wants a field written alone can do it behindoneditrow, which getsvalueswith only the changed key. - Shown at once: the page's rows show the new value with the pending dot. The rows off the page aren't shown, and the table's kept rows have the new value, so Copy of the selection and the foot's Selected line follow it.
Undo
A set is one step. Its rows off the page are undone too: a set is the user's own change, just made, and the table has those rows as it wrote them. For a row on the page, undo is as RFC 0079 has it: a cell someone else changed since is left. For a row off the page, the table has no newer value to compare with, so it writes the value back.
Words
set, setColumn(column), setFor(n), setConfirm(column, value, n, off), setDone(column, n), notLoaded(n), in words.js and en/nb.
Implementation plan
Table.svelte: the Set menu and its panel in the selection bar (Dropdown, the editor snippet reused), the confirm past the page, the write overselectedRows()throughwriteMany, the kept rows updated, ⌘Enter and ⌘Space in a cell, and undo over kept rows.ui/src/internal/edit.js: which columns may be set for a selection, and the changes for one value over a list of rows.- Words, in
words.jsanden/nb. - Tests: the menu's columns (hidden ones, none editable), the panel's editor per kind, an unreadable value, a set on the page with no confirm, a set past the page with one, rows not editable and not loaded, every match over a paged list, progress and Cancel, a failed row, ⌘Enter and ⌘Space, undo of rows on and off the page, and the selection kept.
- Docs:
table.md("A value for the selected rows") with a gallery example, the keyboard table, the skill, CHANGELOG.
Open questions
- Confirm only past the page? Recommendation: yes. A set on rows the user can see is as a paste or a fill, and is undone the same way. Rows they can't see are worth a question, with how many.
- Undo for rows off the page, with nothing to compare to? Recommendation: write them back. The step is the user's own, and there's nothing newer the table knows of. Refusing to undo rows the user can't see would make ⌘Z after "Set for 340 rows" undo 25.
- Rows only as fetched, or fetched again before the write?
Recommendation: as fetched. Fetching 340 rows again doubles the
work, and only matters to an update that takes the whole input; such
an app can write the field alone behind
oneditrow. - A bulk command in one call (
onset(keys, key, value), anupdate_manyfrommake:resource)? Recommendation: not in this RFC. A row at a time gives progress, Cancel and failures per row, and four at once is quick enough for the hundreds a list's selection is. It can come when an app has thousands to set.
Decisions
Accepted 2026-11-30, with the open questions' recommendations:
- The user confirms only past the page: a set on the rows they can see is as a paste or a fill.
- Undo writes the rows off the page back: the step is the user's own, and the table has nothing newer to compare with.
- The rows are written as the table has them, not fetched again.
- No bulk command in one call in this RFC: a row at a time, four at once, with progress, Cancel and failures per row.
As built
As designed, with these differences:
- The panel is under the selection bar, not by the button: a group with the column's editor, Set for 12 rows and Cancel, across the table's width. It closes when the selection is cleared.
- ⌘Space is Spotlight on macOS, so a selected row's boolean also takes ⌘Enter (and Ctrl+Space on Windows and Linux). ⌘Enter and the boolean's keys only reach the selection with more than one row selected; with one, they're the cell's own keys.
- "Not loaded" is a live page's. A plain array's table drops selected keys it has no row for, so there every selected key has a row.
- Undo off the page, over a plain array, compares with the rows as they are now, as on the page: the table has all of them. Only a paged list's rows off the page are written back without a comparison.
- The count on the button is the selection's (Set for 340 rows); what was written, left and not loaded is said after.
Not in this RFC
- A bulk command in one call, and
make:resourcewriting one. - Setting more than one column at once (a form for the selection).
- A value computed from each row (
price × 1.1), or a series. - Setting a column the table doesn't edit (no
edit).
Alternatives considered
- Leave it to
bulk. It's how it's done today, and why it isn't done: a snippet, a menu, a confirm and a loop for each column. - A dialog with a form for the selection. More than one field at once, but a second form for each resource, and most bulk changes are one field.
- Fill down over the selection (⌘D with rows selected). The rows off the page have no order on screen to fill down in, and the value would come from whatever row is first.