Skip to content

Commit af2bdb4

Browse files
Merge pull request #5 from adidas/feature/update-choices-library
Update Choices.js library to v4.1.3
2 parents 60f7f7d + cc296f9 commit af2bdb4

File tree

10 files changed

+185
-384
lines changed

10 files changed

+185
-384
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ deploy:
2121
2222
api_key: $NPM_TOKEN
2323
on:
24-
branch: master
24+
tags: true
25+
condition: $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+
2526
- provider: pages
2627
skip-cleanup: true
2728
local-dir: ./example
2829
github-token: $GITHUB_TOKEN
2930
on:
30-
branch: master
31+
tags: true
32+
condition: $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 1.2.0
2+
3+
- Updated to Choices.js v4.1.3. Changes:
4+
- Renamed property `duplicateItems` to `duplicateItemsAllowed`.
5+
- Renamed property `sortFilter` to `sortFn`.
6+
- Renamed property `removeItemsByValue` to `removeActiveItemsByValue`.
7+
- Renamed property `setValueByChoice` to `setChoiceByValue`.
8+
- Modfied `callbackOnCreateTemplates` which receives the class names as first argument (`this.config.classNames`).
9+
- Removed `sass-inline-svg` dependency because the assets are now bundled along with the CSS.
10+
- Updated TravisCI configuration to publish on tags.
11+
- Updated example.
12+
113
## 1.1.1
214

315
- Fixed placeholder behavior to avoid input dynamic width.

index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
77
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
88
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
9-
<script src="https://cdnjs.cloudflare.com/ajax/libs/choices.js/3.0.4/choices.js"></script>
9+
<script src="https://rawgit.com/jshjohnson/Choices/v4.1.3/public/assets/scripts/choices.js"></script>
1010
<script src="dist/choicesjsstencil.js"></script>
1111
<style>
1212
html {
@@ -217,9 +217,9 @@ <h2 class="col-sm-12">ChoicesJS Web Component: test page</h2>
217217
</span>
218218
</div>
219219
<div class="form-group type type--text type--multiple">
220-
<label for="duplicateItems">
220+
<label for="duplicateItemsAllowed">
221221
Duplicate items
222-
<input type="checkbox" name="duplicateItems" checked>
222+
<input type="checkbox" name="duplicateItemsAllowed" checked>
223223
</label>
224224
<span class="description" data-toggle="tooltip" title="Whether each inputted/chosen item should be unique.">
225225
<span class="glyphicon glyphicon glyphicon-question-sign"></span>
@@ -501,16 +501,16 @@ <h2 class="col-sm-12">ChoicesJS Web Component: test page</h2>
501501
</a>
502502
</div>
503503
<div class="form-group type type--single type--multiple">
504-
<label for="sortFilter">
505-
sortFilter(a, b) {
504+
<label for="sortFn">
505+
sortFn(a, b) {
506506
</label>
507507
<span class="description" data-toggle="tooltip" title="The function that will sort choices and items before they are displayed (unless a user is searching). By default choices and items are sorted by alphabetical order.<br/><br/>The function takes two parameters: a, b.">
508508
<span class="glyphicon glyphicon glyphicon-question-sign"></span>
509509
</span>
510-
<textarea class="form-control textarea--vertical" name="sortFilter" rows="2">
510+
<textarea class="form-control textarea--vertical" name="sortFn" rows="2">
511511
return a.label.localeCompare(b.label);
512512
</textarea>
513-
<label for="sortFilter">}</label>
513+
<label for="sortFn">}</label>
514514
</div>
515515
</div>
516516
</div>
@@ -804,7 +804,7 @@ <h5 class="text-center pad-bottom">See full Fuse documentation in <a href="https
804804
return template.replace('${maxItemCount}', maxItemCount);
805805
};
806806
},
807-
sortFilter: function(value) {
807+
sortFn: function(value) {
808808
return new Function('a', 'b', value.trim());
809809
},
810810
callbackOnInit: function(value) {

0 commit comments

Comments
 (0)