This commit is contained in:
@@ -143,13 +143,13 @@ Actual in inspector browser code:
|
||||
|
||||
*/
|
||||
//set default values for form settings if they are not present yet
|
||||
if (!formSettings.saved || !formSettings.saved.rowsPerPage) {
|
||||
if (!formSettings.saved || !formSettings.saved.itemsPerPage) {
|
||||
that.localFormSettings = {
|
||||
pagination: {}
|
||||
};
|
||||
} else {
|
||||
that.localFormSettings.pagination = {
|
||||
rowsPerPage: formSettings.saved.rowsPerPage,
|
||||
itemsPerPage: formSettings.saved.itemsPerPage,
|
||||
sortBy: [formSettings.saved.sortBy],
|
||||
descending: formSettings.saved.descending
|
||||
};
|
||||
@@ -232,6 +232,7 @@ Actual in inspector browser code:
|
||||
//console.log(this.selected);
|
||||
},
|
||||
getDataFromApi() {
|
||||
//debugger;
|
||||
var that = this;
|
||||
var listOptions = {
|
||||
offset: 0,
|
||||
@@ -241,13 +242,13 @@ Actual in inspector browser code:
|
||||
};
|
||||
|
||||
if (
|
||||
this.localFormSettings.pagination.rowsPerPage &&
|
||||
this.localFormSettings.pagination.rowsPerPage > 0
|
||||
this.localFormSettings.pagination.itemsPerPage &&
|
||||
this.localFormSettings.pagination.itemsPerPage > 0
|
||||
) {
|
||||
listOptions.offset =
|
||||
(this.localFormSettings.pagination.page - 1) *
|
||||
this.localFormSettings.pagination.rowsPerPage;
|
||||
listOptions.limit = this.localFormSettings.pagination.rowsPerPage;
|
||||
this.localFormSettings.pagination.itemsPerPage;
|
||||
listOptions.limit = this.localFormSettings.pagination.itemsPerPage;
|
||||
}
|
||||
listOptions.sort = this.localFormSettings.pagination.sortBy;
|
||||
listOptions.asc = !this.localFormSettings.pagination.descending;
|
||||
@@ -256,12 +257,12 @@ Actual in inspector browser code:
|
||||
if (
|
||||
that.localFormSettings &&
|
||||
that.localFormSettings.pagination &&
|
||||
that.localFormSettings.pagination.rowsPerPage
|
||||
that.localFormSettings.pagination.itemsPerPage
|
||||
) {
|
||||
window.$gz.form.setFormSettings(FORM_KEY, {
|
||||
temp: { page: that.localFormSettings.pagination.page },
|
||||
saved: {
|
||||
rowsPerPage: that.localFormSettings.pagination.rowsPerPage,
|
||||
itemsPerPage: that.localFormSettings.pagination.itemsPerPage,
|
||||
sortBy: that.localFormSettings.pagination.sortBy,
|
||||
descending: that.localFormSettings.pagination.descending
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user