Closed jbrodriguez closed 5 years ago
same problem.
Same here.
@jbrodriguez @esmaei1 @Andrianov Please try v2.1.0
. Thanks. Any questions please reopen this issue, thanks!
i'm having the same issue i have version 2.1.0 Im trying to show the active page if theres an offset in the url query all works fine but when i try change page i get the above erro
<paginate
v-model="currentPage"
:page-count="totalRows"
:click-handler="nextPage"
:prev-text="'Prev'"
:next-text="'Next'"
:page-link-class="'page-link'"
:pageClass="'page-item'"
:prev-class="'page-item'"
:prev-link-class="'page-link'"
:next-class="'page-item'"
:next-link-class="'page-link'"
:containerClass="'pagination justify-content-center'"
>
</paginate>
async nextPage(pageNum) {
const query = this.$route.query;
const newQuery = {
offset: this.offset = (this.perPage * pageNum) - this.perPage,
limit: query.limit || 18,
subcategory: query.subcategory || '',
category: query.category || '',
country: query.country || '',
city: query.city || '',
state: query.state || '',
search: query.search || ''
};
this.$router.push({query: newQuery});
await this.$store.dispatch('search/getSearchResults', newQuery)
}
currentPage() {
return (this.query.offset / 18) + 1
},
i sorted it out by removing currentPage from computed and adding it to data()
data() {
return {
perPage: 18,
offset: 0,
currentPage: this.$route.query.offset !== 0 ? (this.$route.query.offset / 18) + 1 : 1
}
},
i sorted it out by removing currentPage from computed and adding it to data()
data() { return { perPage: 18, offset: 0, currentPage: this.$route.query.offset !== 0 ? (this.$route.query.offset / 18) + 1 : 1 } },
Dont think this is a good one. Any other better solution?
i sorted it out by removing currentPage from computed and adding it to data()
data() { return { perPage: 18, offset: 0, currentPage: this.$route.query.offset !== 0 ? (this.$route.query.offset / 18) + 1 : 1 } },
Dont think this is a good one. Any other better solution?
I didn't look into it I just left it on the data(), let me know if you find another way
having same problem, is there anything else to sort this out
I have the same issue - Computed property "count" was assigned to but it has no setter. I just created my Vue app and tested the vuex. Started with an issue, it's not a good sign (( does anybody help me?
I'm getting this warning coming from this component.
Looking at the code, there's a getter (https://github.com/lokyoung/vuejs-paginate/blob/master/src/components/Paginate.vue#L140), but no setter.
Any thoughts ?