Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions fields/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,20 @@ If you select the first item, the `value` will be `"Personal"` in the model.

If you select the second item, the `value` will be `"en-US"` in the model.

### Creating an \<optgroup\> with Select field:

```js
{
type: "select",
label: "Choose the fastest",
model: "the-fastest",
required: true,
values: [
{ name: "Marc Marquez", id: "93", group: "MotoGP" },
{ name: "Valentino Rossi", id: "46", group: "MotoGP" },
{ name: "Lewis Hamilton", id: "44", group: "Formula 1" },
{ name: "Sebastian Vettel", id: "5", group: "Formula 1" }
],
validator: validators.required
}
```