removes page_size from store
This commit is contained in:
parent
a5928c7e43
commit
9e69400142
|
@ -155,7 +155,6 @@ export default {
|
||||||
'column_name': this.active_column,
|
'column_name': this.active_column,
|
||||||
'order': this.columns_order[this.active_column]}
|
'order': this.columns_order[this.active_column]}
|
||||||
this.setSites(payload)
|
this.setSites(payload)
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setActiveColumn: function(name) {
|
setActiveColumn: function(name) {
|
||||||
|
@ -188,10 +187,10 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
sites: function() {
|
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() {
|
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 true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -17,7 +17,7 @@ document.querySelectorAll("[data-vue-component=archive-list]")
|
||||||
new ComponentClass({
|
new ComponentClass({
|
||||||
components: {'ArchiveList': ArchiveList},
|
components: {'ArchiveList': ArchiveList},
|
||||||
propsData: { ...element.dataset },
|
propsData: { ...element.dataset },
|
||||||
props: ["collections"],
|
props: ["collections", "page_size"],
|
||||||
store: store,
|
store: store,
|
||||||
}).$mount(element);
|
}).$mount(element);
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,6 @@ const store = new Vuex.Store({
|
||||||
search_text: "",
|
search_text: "",
|
||||||
sites: [],
|
sites: [],
|
||||||
filtered_sites: [],
|
filtered_sites: [],
|
||||||
page_size: 10,
|
|
||||||
page_count: 1,
|
page_count: 1,
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -58,9 +57,6 @@ const store = new Vuex.Store({
|
||||||
}
|
}
|
||||||
return state.filtered_sites
|
return state.filtered_sites
|
||||||
},
|
},
|
||||||
getPageSize: state => {
|
|
||||||
return state.page_size
|
|
||||||
},
|
|
||||||
getPageCount: state => {
|
getPageCount: state => {
|
||||||
return state.page_count
|
return state.page_count
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue