This commit is contained in:
@@ -99,11 +99,24 @@ export default {
|
|||||||
// var listUrl = "Widget/ListWidgets?" + window.$gz.api.buildQuery(listOptions);
|
// var listUrl = "Widget/ListWidgets?" + window.$gz.api.buildQuery(listOptions);
|
||||||
//DataList/list?DataListKey=TestWidgetDataList&Offset=0&Limit=999&DataFilterId=1&mini=true
|
//DataList/list?DataListKey=TestWidgetDataList&Offset=0&Limit=999&DataFilterId=1&mini=true
|
||||||
|
|
||||||
|
//start with defaults
|
||||||
var listOptions = {
|
var listOptions = {
|
||||||
DataListKey: that.dataListKey,
|
DataListKey: that.dataListKey,
|
||||||
Limit: 5,
|
Limit: 100,
|
||||||
Offset: 0
|
Offset: 0
|
||||||
};
|
};
|
||||||
|
//fixup paging based on settings
|
||||||
|
const { page, itemsPerPage } = that.options;
|
||||||
|
if (
|
||||||
|
this.localFormSettings.pagination.itemsPerPage &&
|
||||||
|
this.localFormSettings.pagination.itemsPerPage > 0
|
||||||
|
) {
|
||||||
|
listOptions.offset =
|
||||||
|
(this.localFormSettings.pagination.page - 1) *
|
||||||
|
this.localFormSettings.pagination.itemsPerPage;
|
||||||
|
listOptions.limit = this.localFormSettings.pagination.itemsPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
//is there a filter?
|
//is there a filter?
|
||||||
if (that.dataFilterId != 0) {
|
if (that.dataFilterId != 0) {
|
||||||
listOptions["DataFilterID"] = that.dataFilterId;
|
listOptions["DataFilterID"] = that.dataFilterId;
|
||||||
|
|||||||
Reference in New Issue
Block a user