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