Skip to content

Commit ffcaa79

Browse files
author
Ken Berkeley
committed
[fix] the leading MultiSelect would be checked when no data
1 parent 0c07c20 commit ffcaa79

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

dist/min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/client.69b61460.js renamed to examples/dist/client.725e4d2f.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
<script src="//unpkg.com/jquery@2.1.4/dist/jquery.min.js"></script>
1414
<script src="//unpkg.com/bootstrap@3.3.5/dist/js/bootstrap.min.js"></script>
15-
<script type="text/javascript" src="client.69b61460.js"></script></body>
15+
<script type="text/javascript" src="client.725e4d2f.js"></script></body>
1616
</html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue2-datatable-component",
33
"description": "The best Datatable for Vue.js 2.x which never sucks",
4-
"version": "2.1.2",
4+
"version": "2.1.3",
55
"main": "dist/min.js",
66
"module": "src/index.js",
77
"author": "Ken Berkeley <kenberkeley@foxmail.com>",

src/MainTable/MultiSelect.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ export default {
4040
replaceWith(this.selection, [])
4141
},
4242
selection (selection) {
43-
if (this.row) return this.status = this.pos >= 0
44-
if (this.rows) this.status = this.rows.length === selection.length
43+
if (this.row) {
44+
this.status = this.pos >= 0
45+
return
46+
}
47+
if (this.rows) {
48+
// not only same length but also non-zero
49+
this.status = this.rows.length === selection.length && selection.length
50+
}
4551
}
4652
}
4753
}

0 commit comments

Comments
 (0)