This commit is contained in:
2021-03-15 21:45:24 +00:00
parent 98ca3ce17f
commit c9a3c19710

View File

@@ -1,6 +1,7 @@
<template>
<div>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<!-- cols:{{ serverColumns }} filt:{{ serverFilter }} srt:{{ serverSort }} -->
<gz-data-table-filter
:data-list-key="dataListKey"
:active-filter-id="activeFilterId"
@@ -612,14 +613,17 @@ export default {
if (rsort != null) {
Object.keys(rsort).forEach((key, index) => {
//Pull column header name "value" from "fk"matching "key" here from this.headers columns.c0 etc here from this.headers see above method
sortBy.push(this.headers.find(z => z.fk == key).value);
let found = this.headers.find(z => z.fk == key);
if (found != null) {
sortBy.push(found.value);
//if not null then push into the sortBy array
let sort = rsort[key];
if (sort == "-") {
sortDesc.push(true);
} else {
sortDesc.push(false);
//if not null then push into the sortBy array
let sort = rsort[key];
if (sort == "-") {
sortDesc.push(true);
} else {
sortDesc.push(false);
}
}
});
}
@@ -779,7 +783,7 @@ export default {
//build vm.headers here
vm.headers = buildHeaders(res.columns);
//SET TABLE SORT HERE FROM RESPONSE
//SET TABLE SORT HERE FROM RESPONSE
vm.setSortIndicatorsFromDataListResponse(res.sortBy);
//Post process data here and then set vm.records