io.select.multiple
Several choices, listed one per row.
io.select.multiple asks to pick several options. The drop-down sits on top and every pick gets a row under it. The × on a row takes the pick back. The handler gets the chosen options themselves, records from your database included.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Notify delay
What you can set
The settings you will reach for most, each with the line of code that turns it on.
One row per pick. Each chosen option is listed under the drop-down. The × on its right takes it back.
Only what is left. The drop-down offers the options not chosen yet. Nothing can be picked twice.
Records from your database. key says what identifies each record and label what the list shows. The handler gets the records back.
Picked at the start. defaultValue takes the options or just their keys. Ids from your records are enough.
A minimum and a maximum. minSelections asks for at least so many. At maxSelections the drop-down stops offering more.
In the order of the options. The handler gets the picks in the order you passed the options. The order they were clicked does not matter.
Optional when you say so. Nothing picked counts as empty. With .optional() the handler gets undefined for it.
Checked on the server. Too few, too many or a value that was not offered is sent back. The message shows under the field.
Checks of your own. .validate() gets the chosen options 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.