Skip to content

Commit

Permalink
Add note about setting multiselect values
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Jan 18, 2022
1 parent 2ad00de commit 52933a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/components/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const App = () => (

### Multiple

To allow multiple options to be selected, use the `multiple` attribute. It's a good practice to use `clearable` when this option is enabled. When using this option, `value` will be an array instead of a string.
To allow multiple options to be selected, use the `multiple` attribute. It's a good practice to use `clearable` when this option is enabled. When using this option, the `value` property will be an array of strings instead of a string.

```html preview
<sl-select placeholder="Select a few" multiple clearable>
Expand Down Expand Up @@ -188,6 +188,8 @@ const App = () => (
);
```

?> When using the `multiple` attribute, the `value` property will be an array instead of a string. To set it in your HTML, obtain a reference to the element and set `value` to an array of strings.

### Grouping Options

Options can be grouped visually using menu labels and dividers.
Expand Down

0 comments on commit 52933a5

Please sign in to comment.