vue-paginate
Advanced tools
Comparing version 2.1.2 to 2.1.3
{ | ||
"name": "vue-paginate", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "A simple vue.js plugin to paginate data", | ||
@@ -5,0 +5,0 @@ "main": "dist/vue-paginate.js", |
@@ -77,2 +77,3 @@ import {Vue} from './index'; | ||
this.setLimitedPages(limit); | ||
this.update(this.originalList); | ||
}; | ||
@@ -87,2 +88,4 @@ | ||
this.list.currentPage; | ||
this.update(this.originalList); | ||
}; | ||
@@ -96,2 +99,4 @@ | ||
0; | ||
this.update(this.originalList); | ||
}; | ||
@@ -98,0 +103,0 @@ |
@@ -43,3 +43,2 @@ import {should} from 'chai'; should(); | ||
vm.changeLangsPage(2); | ||
triggerUpdate(); | ||
@@ -50,13 +49,13 @@ vm.$data.currentLangsPage.should.equal(2); | ||
it('refreshes the list', () => { | ||
it('refreshes the list', (done) => { | ||
vm.$data.langsLinks.should.have.length(2); | ||
vm.$data.fullLangs = ['PHP', 'JS', 'Ruby', 'Python', 'Java', 'Erlang']; | ||
vm.refreshLangsPage(); | ||
triggerUpdate(); | ||
vm.$data.langsLinks.should.have.length(3); | ||
Vue.nextTick(() => { | ||
vm.$data.langsLinks.should.have.length(3); | ||
done(); | ||
}); | ||
}); | ||
it('supports next/prev navigation', () => { | ||
it('supports next/prev navigation', (done) => { | ||
vm.$data.currentLangsPage.should.equal(1); | ||
@@ -66,22 +65,27 @@ vm.$data.langs.should.eql(['PHP', 'JS']); | ||
vm.nextLangsPage(); | ||
triggerUpdate(); | ||
vm.$data.currentLangsPage.should.equal(2); | ||
vm.$data.langs.should.eql(['Ruby', 'Python']); | ||
Vue.nextTick(() => { | ||
vm.$data.currentLangsPage.should.equal(2); | ||
vm.$data.langs.should.eql(['Ruby', 'Python']); | ||
vm.prevLangsPage(); | ||
triggerUpdate(); | ||
vm.prevLangsPage(); | ||
vm.$data.currentLangsPage.should.equal(1); | ||
vm.$data.langs.should.eql(['PHP', 'JS']); | ||
Vue.nextTick(() => { | ||
vm.$data.currentLangsPage.should.equal(1); | ||
vm.$data.langs.should.eql(['PHP', 'JS']); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
it('checks if there is a need to show the navigation links', () => { | ||
it('checks if there is a need to show the navigation links', (done) => { | ||
vm.$data.hasLangsLinks.should.be.true; | ||
vm.$data.fullLangs = ['PHP', 'JS']; | ||
vm.refreshLangsPage(); | ||
triggerUpdate(); | ||
vm.$data.hasLangsLinks.should.be.false; | ||
Vue.nextTick(() => { | ||
vm.$data.hasLangsLinks.should.be.false; | ||
done(); | ||
}); | ||
}); | ||
@@ -184,3 +188,1 @@ | ||
}); | ||
var triggerUpdate = () => vm._directives[0].update(vm.$data.fullLangs); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46975
868