This commit is contained in:
@@ -133,17 +133,20 @@ export default {
|
|||||||
getDataFromApi() {
|
getDataFromApi() {
|
||||||
// debugger;
|
// debugger;
|
||||||
var listOptions = {
|
var listOptions = {
|
||||||
Offset: 0,
|
offset: 0,
|
||||||
Limit: 5,
|
limit: 5,
|
||||||
SortBy: "name"
|
sort: "name",
|
||||||
|
asc:true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) {
|
if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) {
|
||||||
listOptions.Offset =
|
listOptions.offset =
|
||||||
(this.pagination.page - 1) * this.pagination.rowsPerPage;
|
(this.pagination.page - 1) * this.pagination.rowsPerPage;
|
||||||
listOptions.Limit = this.pagination.rowsPerPage;
|
listOptions.limit = this.pagination.rowsPerPage;
|
||||||
}
|
}
|
||||||
listOptions.SortBy = this.pagination.sortBy;
|
listOptions.sort = this.pagination.sortBy;
|
||||||
|
listOptions.asc=!this.pagination.descending;
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
pagedList.fetch("Widget/ListWidgets", listOptions).then(res => {
|
pagedList.fetch("Widget/ListWidgets", listOptions).then(res => {
|
||||||
// debugger;
|
// debugger;
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
[Range(1, MaxPageSize, ErrorMessage = "Limit must be greater than 0 and less than 100.")]
|
[Range(1, MaxPageSize, ErrorMessage = "Limit must be greater than 0 and less than 100.")]
|
||||||
public int? Limit { get; set; }
|
public int? Limit { get; set; }
|
||||||
|
|
||||||
|
public string Sort {get;set;}
|
||||||
|
public bool? Asc {get;set;}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user