diff --git a/ayanova/src/components/data-table.vue b/ayanova/src/components/data-table.vue
index 03c6ad90..000d620f 100644
--- a/ayanova/src/components/data-table.vue
+++ b/ayanova/src/components/data-table.vue
@@ -3,7 +3,7 @@
{{ dataTablePagingOptions }}
-
+ {{ headers }}
{
+ //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);
+
+ //if not null then push into the sortBy array
+ let sort = rsort[key];
+ if (sort == "-") {
+ sortDesc.push(true);
+ } else {
+ sortDesc.push(false);
+ }
+ // console.log(`${key}: ${rsort[key]}`);
+ });
+ }
+ //vm.selected = [...preSelected];
+ this.dataTablePagingOptions.sortBy = [...sortBy];
+ this.dataTablePagingOptions.sortDesc = [...sortDesc];
+ console.log("setsortindicator:", { sortBy: sortBy, sortDesc: sortDesc });
// {
// "sortBy": {
// "customername": "-",
@@ -524,6 +545,10 @@ export default {
// "customeremail": "-"
// }
// }
+ //to this
+ //
+ //this.dataTablePagingOptions.sortDesc
+ //{ "page": 1, "itemsPerPage": 10, "sortBy": [ "columns.c0", "columns.c1", "columns.c2" ], "sortDesc": [ false, false, true ], "groupBy": [], "groupDesc": [], "mustSort": false, "multiSort": true }
},
refresh() {
this.getDataFromApi();