Skip to content

Commit ef0f214

Browse files
author
Damian Dulisz
committed
Tests for events [3/5], pointer adjustments
* Fixes shentao#6 * Fixes shentao#58 * Related to shentao#48 * Simplify search element management * Still needs more tests and update to older tests for new use cases
1 parent 8a552dd commit ef0f214

15 files changed

+205
-48
lines changed

docs/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,19 @@ new Vue({
9696
}
9797
},
9898
updateExampleValue (value) {
99-
console.log('@change: ', value)
99+
console.log('@update: ', value)
100100
this.exampleValue6 = value
101101
},
102102
updateValue (value) {
103-
console.log('@change: ', value)
103+
console.log('@update: ', value)
104104
this.value = value
105105
},
106106
updateMultiValue (value) {
107-
console.log('@change: ', value)
107+
console.log('@update: ', value)
108108
this.multiValue = value
109109
},
110110
updateValuePrimitive (value) {
111-
console.log('@change: ', value)
111+
console.log('@update: ', value)
112112
this.valuePrimitive = value
113113
},
114114
nameWithLang ({ name, language }) {

docs/partials/_getting-started.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
multiselect(
2828
:selected="selected",
2929
:options="options",
30-
@change="updateSelected"
30+
@update="updateSelected"
3131
)
3232
pre.language-javascript
3333
code.

docs/partials/_start.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ section.start
1919
:limit="3",
2020
:taggable="true",
2121
@tag="onTagging"
22-
@change="afterChange",
22+
@update="afterChange",
2323
placeholder="Select option",
2424
select-label="Enter to select"
2525
)

docs/partials/examples/_ajax-search.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ p.typo__p
1313
:multiple="multiple",
1414
:searchable="searchable",
1515
:clear-on-select="false",
16+
:close-on-select="false",
1617
:async="true",
1718
@search-change="asyncFind",
1819
label="name"
@@ -35,6 +36,7 @@ p.typo__p
3536
:multiple="multiple",
3637
:searchable="searchable",
3738
:clear-on-select="false",
39+
:close-on-select="false",
3840
:async="true",
3941
@search-change="asyncFind",
4042
label="name"

docs/partials/examples/_custom.jade

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ p.typo__p Shows error when touched, but nothing is selected.
1414
:allow-empty="false",
1515
:hide-selected="true",
1616
:touched.sync="isTouched",
17+
:close-on-select="false",
1718
:max-height="400",
1819
:max="5"
19-
@change="updateExampleValue"
20+
@update="updateExampleValue"
2021
placeholder="Pick at least one"
2122
)
2223

@@ -35,9 +36,10 @@ p.typo__p Shows error when touched, but nothing is selected.
3536
:allow-empty="false",
3637
:hide-selected="true",
3738
:touched.sync="isTouched",
39+
:close-on-select="false",
3840
:max-height="400",
3941
:max="5"
40-
@change="updateExampleValue"
42+
@update="updateExampleValue"
4143
placeholder="Pick at least one"
4244
)
4345

docs/partials/examples/_multi-select-search.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ p.typo__p Limit visible results to 2.
88
:selected="multiValue",
99
:multiple="true",
1010
:searchable="true",
11-
:close-on-select="true",
11+
:close-on-select="false",
1212
:clear-on-select="false",
1313
:limit="2"
14-
@change="updateMultiValue",
14+
@update="updateMultiValue",
1515
placeholder="Pick some"
1616
label="name",
1717
key="name"
@@ -29,10 +29,10 @@ p.typo__p Limit visible results to 2.
2929
:selected="multiValue",
3030
:multiple="true",
3131
:searchable="true",
32-
:close-on-select="true",
32+
:close-on-select="false",
3333
:clear-on-select="false",
3434
:limit="2"
35-
@change="updateMultiValue",
35+
@update="updateMultiValue",
3636
placeholder="Pick some"
3737
label="name",
3838
key="name"

docs/partials/examples/_single-select-object.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ p.typo__p The selected value is referencing the same object as the next example,
1111
:searchable="false",
1212
:close-on-select="false",
1313
:allow-empty="false",
14-
@change="updateValue",
14+
@update="updateValue",
1515
deselect-label="Can't remove this value"
1616
key="name"
1717
label="name"
@@ -32,7 +32,7 @@ p.typo__p The selected value is referencing the same object as the next example,
3232
:searchable="false",
3333
:close-on-select="false",
3434
:allow-empty="false",
35-
@change="updateValue",
35+
@update="updateValue",
3636
deselect-label="Can't remove this value"
3737
key="name"
3838
label="name"

docs/partials/examples/_single-select-primitve.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ p.typo__p Disabled all highlight label text.
1010
:searchable="false",
1111
:close-on-select="false",
1212
:show-labels="false"
13-
@change="updateValuePrimitive"
13+
@update="updateValuePrimitive"
1414
placeholder="Select one"
1515
label="name"
1616
)
@@ -29,7 +29,7 @@ p.typo__p Disabled all highlight label text.
2929
:searchable="false",
3030
:close-on-select="false",
3131
:show-labels="false"
32-
@change="updateValuePrimitive"
32+
@update="updateValuePrimitive"
3333
placeholder="Select one"
3434
label="name"
3535
)

docs/partials/examples/_single-select-search.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ p.typo__p The selected value is referencing the same object as the previous exam
99
:multiple="false",
1010
:searchable="true",
1111
:custom-label="nameWithLang"
12-
@change="updateValue",
12+
@update="updateValue",
1313
placeholder="Select one",
1414
label="name",
1515
key="name"
@@ -28,7 +28,7 @@ p.typo__p The selected value is referencing the same object as the previous exam
2828
:multiple="false",
2929
:searchable="true",
3030
:custom-label="nameWithLang"
31-
@change="updateValue",
31+
@update="updateValue",
3232
placeholder="Select one",
3333
label="name",
3434
key="name"

docs/partials/examples/_tagging.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ p.typo__p
77
multiselect(
88
:options="taggingOptions",
99
:selected="taggingSelected",
10-
:multiple="multiple",
10+
:multiple="true",
1111
:searchable="searchable",
1212
:taggable="true",
1313
@tag="addTag",
14-
@change="updateSelectedTagging",
14+
@update="updateSelectedTagging",
1515
@select="onSelect",
1616
@remove="onRemove",
1717
tag-placeholder="Add this as new tag"
@@ -36,7 +36,7 @@ p.typo__p
3636
:searchable="searchable",
3737
:taggable="true",
3838
@tag="addTag",
39-
@change="updateSelectedTagging",
39+
@update="updateSelectedTagging",
4040
@select="onSelect",
4141
@remove="onRemove",
4242
tag-placeholder="Add this as new tag"

0 commit comments

Comments
 (0)