removes page_size from store

This commit is contained in:
buttle 2021-11-10 14:33:23 +01:00
parent a5928c7e43
commit 9e69400142
3 changed files with 3 additions and 8 deletions

View File

@ -155,7 +155,6 @@ export default {
'column_name': this.active_column,
'order': this.columns_order[this.active_column]}
this.setSites(payload)
},
methods: {
setActiveColumn: function(name) {
@ -188,10 +187,10 @@ export default {
},
computed: {
sites: function() {
return this.getDisplayedSites().slice(0, this.getPageCount() * this.getPageSize())
return this.getDisplayedSites().slice(0, this.getPageCount() * this.page_size)
},
more_sites_to_display: function() {
if (this.getDisplayedSites().length > this.getPageCount() * this.getPageSize()) {
if (this.getDisplayedSites().length > this.getPageCount() * this.page_size) {
return true
}
return false

View File

@ -17,7 +17,7 @@ document.querySelectorAll("[data-vue-component=archive-list]")
new ComponentClass({
components: {'ArchiveList': ArchiveList},
propsData: { ...element.dataset },
props: ["collections"],
props: ["collections", "page_size"],
store: store,
}).$mount(element);
});

View File

@ -17,7 +17,6 @@ const store = new Vuex.Store({
search_text: "",
sites: [],
filtered_sites: [],
page_size: 10,
page_count: 1,
},
mutations: {
@ -58,9 +57,6 @@ const store = new Vuex.Store({
}
return state.filtered_sites
},
getPageSize: state => {
return state.page_size
},
getPageCount: state => {
return state.page_count
},