io.select.table
Pick rows straight from a table.
io.select.table shows records as a table with a radio or a checkbox in front of each row. The person picks one row or several. The handler gets the picked records themselves, every field included. The table has the same filter, pager and columns as io.display.table.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Reset password
What you can set
The settings you will reach for most, each with the line of code that turns it on.
One row by default. Every row gets a radio and one must be picked. The handler gets it in a list.
Checkboxes for several. Raise maxSelections and the radios turn into checkboxes. A pick past the limit is ignored.
The records come back. Pass rows as your query returns them. The handler gets the same objects, dates and relations included.
Columns like the display table. Name a key, or build a cell from the whole record with renderCell.
Filter and paging. A filter above the table and a pager under it, both in the browser. Ten rows a page unless you say otherwise.
Picked at the start. defaultValue takes items of data. Copies with the same values work too.
Nothing to pick. With no rows, the person sees emptyText and continues. The handler gets an empty list.
Checked on the server. The browser answers only with the positions of the picked rows. Too few, too many or a row that was not in the table is sent back.
Checks of your own. .validate() gets the picked rows on the server. Return a message and the person picks again.
More in the docs
This page shows the idea. The docs have every prop, the checks on the server and more examples.
Next components
Three more calls on io. Each one shows a control and hands your code a typed value.
Write your first tool today.
An async function, a few await calls, and the form is in the browser.