Add placeholder example to read me

This commit is contained in:
Josh Johnson 2017-08-03 12:27:33 +01:00
parent 899a7f1531
commit bab75d6af1

View file

@ -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.
**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
**Type:** `String` **Default:** `null`