From 9e69400142842534782006cff03fe4df3946adfd Mon Sep 17 00:00:00 2001 From: buttle Date: Wed, 10 Nov 2021 14:33:23 +0100 Subject: [PATCH] removes page_size from store --- src/components/archiveList.vue | 5 ++--- src/loaders/archiveListLoader.js | 2 +- src/store.js | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/archiveList.vue b/src/components/archiveList.vue index 34c3498..4634c81 100644 --- a/src/components/archiveList.vue +++ b/src/components/archiveList.vue @@ -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 diff --git a/src/loaders/archiveListLoader.js b/src/loaders/archiveListLoader.js index 6252ca7..fe49dc5 100644 --- a/src/loaders/archiveListLoader.js +++ b/src/loaders/archiveListLoader.js @@ -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); }); diff --git a/src/store.js b/src/store.js index 992901d..32d83f4 100644 --- a/src/store.js +++ b/src/store.js @@ -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 },