Skip to content

Commit

Permalink
Add support for standard-compliant placeholder option (#617)
Browse files Browse the repository at this point in the history
* Add support for standard-compliant placeholder option

* Bump version and rebuild files
  • Loading branch information
stof authored and jshjohnson committed Oct 22, 2019
1 parent 51ac331 commit 4a22885
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 272 deletions.
530 changes: 270 additions & 260 deletions assets/scripts/choices.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/scripts/choices.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions assets/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ a:focus {
border-radius: 2.5px;
font-size: 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
appearance: none;
margin-bottom: 24px;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/styles/base.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions assets/styles/choices.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
.choices.is-disabled .choices__input {
background-color: #EAEAEA;
cursor: not-allowed;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

.choices.is-disabled .choices__item {
Expand Down Expand Up @@ -302,7 +304,9 @@

.choices__item--disabled {
cursor: not-allowed;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
opacity: .5;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/styles/choices.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h2>Multiple select input</h2>
<h2>Single select input</h2>
<label for="choices-single-default">Default</label>
<select class="form-control" data-trigger name="choices-single-default" id="choices-single-default" placeholder="This is a search placeholder">
<option placeholder>This is a placeholder</option>
<option value="">This is a placeholder</option>
<option value="Choice 1">Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
Expand All @@ -167,12 +167,12 @@ <h2>Single select input</h2>

<label for="choices-single-remote-fetch">Options from remote source (Fetch API)</label>
<select class="form-control" name="choices-single-remote-fetch" id="choices-single-remote-fetch">
<option placeholder>Pick an Arctic Monkeys' record</option>
<option value="">Pick an Arctic Monkeys' record</option>
</select>

<label for="choices-single-remove-xhr">Options from remote source (XHR) &amp; remove button</label>
<select class="form-control" name="choices-single-remove-xhr" id="choices-single-remove-xhr">
<option placeholder>Pick a Smiths' record</option>
<option value="">Pick a Smiths' record</option>
</select>

<label for="choices-single-groups">Option groups</label>
Expand Down

0 comments on commit 4a22885

Please sign in to comment.