This commit is contained in:
2018-11-28 22:57:10 +00:00
parent 6f21a13349
commit c2ab4c5afc
2 changed files with 13 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;}
}
}