mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-17 13:15:08 +02:00
Add placeholder example to read me
This commit is contained in:
parent
899a7f1531
commit
bab75d6af1
11
README.md
11
README.md
|
@ -362,6 +362,17 @@ const example = new Choices(element, {
|
||||||
|
|
||||||
**Usage:** Whether the input should show a placeholder. Used in conjunction with `placeholderValue`. If `placeholder` is set to true and no value is passed to `placeholderValue`, the passed input's placeholder attribute will be used as the placeholder value.
|
**Usage:** Whether the input should show a placeholder. Used in conjunction with `placeholderValue`. If `placeholder` is set to true and no value is passed to `placeholderValue`, the passed input's placeholder attribute will be used as the placeholder value.
|
||||||
|
|
||||||
|
**Note:** For single select boxes, the recommended way of adding a placeholder is as follows:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<select>
|
||||||
|
<option placeholder>This is a placeholder</option>
|
||||||
|
<option>...</option>
|
||||||
|
<option>...</option>
|
||||||
|
<option>...</option>
|
||||||
|
</select>
|
||||||
|
```
|
||||||
|
|
||||||
### placeholderValue
|
### placeholderValue
|
||||||
**Type:** `String` **Default:** `null`
|
**Type:** `String` **Default:** `null`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue