kopia lustrzana https://github.com/shoelace-style/shoelace
update docs
rodzic
e73e32fb71
commit
c743561c25
|
@ -252,9 +252,7 @@ Note that multi-select options may wrap, causing the control to expand verticall
|
|||
|
||||
Use the `value` attribute to set the initial selection.
|
||||
|
||||
When using `multiple`, the `value` _attribute_ uses space-delimited values to select more than one option.
|
||||
Note that `sl-option` values cannot contain spaces for this reason. If accessing or setting the `value` _property_
|
||||
through Javascript, `value` is an array.
|
||||
When using `multiple`, the `value` _attribute_ uses space-delimited values to select more than one option. Because of this, `<sl-option>` values cannot contain spaces. If you're accessing the `value` _property_ through Javascript, it will be an array.
|
||||
|
||||
```html:preview
|
||||
<sl-select value="option-1 option-2" multiple clearable>
|
||||
|
@ -265,11 +263,6 @@ through Javascript, `value` is an array.
|
|||
</sl-select>
|
||||
```
|
||||
|
||||
```js
|
||||
const select = document.querySelector('sl-select[multiple]');
|
||||
select.value = ['option-1', 'option-2']
|
||||
```
|
||||
|
||||
```jsx:react
|
||||
import SlDivider from '@shoelace-style/shoelace/dist/react/divider';
|
||||
import SlOption from '@shoelace-style/shoelace/dist/react/option';
|
||||
|
|
Ładowanie…
Reference in New Issue