Skip to content

Commit

Permalink
fix #107
Browse files Browse the repository at this point in the history
  • Loading branch information
matfish2 committed Sep 24, 2016
1 parent abf1c8c commit f0805e5
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/vue-tables.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/filters/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = function(data, query) {
return data;
}

this.initPagination();

var value;
var found;
var currentQuery;
Expand Down
2 changes: 1 addition & 1 deletion lib/methods/compile-templates.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function() {
var tbody = this.$els.tbody;
this.$compile(tbody);
this.$compile(tbody);
}
3 changes: 2 additions & 1 deletion lib/methods/init-pagination.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = function() {
this.page = 1;

if (!this.options.pagination.dropdown)
this.$refs.pagination.setPage(1);
this.$children[0].setPage(1);
}
2 changes: 1 addition & 1 deletion lib/methods/set-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function(page, initPagination) {
this.page = page;

if (initPagination && !this.options.pagination.dropdown)
this.$refs.pagination.setPage(1);
this.$children[0].setPage(1);

if (this.source=='server' && this.options.pagination.dropdown)
this.getData()
Expand Down
2 changes: 1 addition & 1 deletion lib/mixins/ready.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
ready: function() {
this.$compile(this.$els.headings);
this.$compile(this.$els.headings);
}
}
2 changes: 1 addition & 1 deletion lib/table-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</table>
</div>

<pagination v-ref:pagination v-if="options.pagination && !options.pagination.dropdown"
<pagination v-if="options.pagination && !options.pagination.dropdown"
:for="id"
:records="count"
:per-page="limit"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-tables",
"description": "Vue.js grid components",
"version": "1.5.6",
"version": "1.5.7",
"keywords": [
"vue",
"bootstrap",
Expand Down
1 change: 1 addition & 0 deletions tests/unit/filters/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('it filters down the data according to the query', function() {
var context = {
isListFilter:require('../../../lib/methods/is-list-filter'),
$dispatch: function() {},
initPagination: function() {},
options: {
listColumns:{},
filterByColumn:false,
Expand Down

0 comments on commit f0805e5

Please sign in to comment.