|
@@ -309,6 +309,7 @@
|
|
|
footerFormatter: undefined,
|
|
footerFormatter: undefined,
|
|
|
events: undefined,
|
|
events: undefined,
|
|
|
sorter: undefined,
|
|
sorter: undefined,
|
|
|
|
|
+ sortName: undefined,
|
|
|
cellStyle: undefined,
|
|
cellStyle: undefined,
|
|
|
searchable: true,
|
|
searchable: true,
|
|
|
cardVisible: true
|
|
cardVisible: true
|
|
@@ -437,6 +438,7 @@
|
|
|
formatters: [],
|
|
formatters: [],
|
|
|
events: [],
|
|
events: [],
|
|
|
sorters: [],
|
|
sorters: [],
|
|
|
|
|
+ sortNames: [],
|
|
|
cellStyles: [],
|
|
cellStyles: [],
|
|
|
clickToSelects: [],
|
|
clickToSelects: [],
|
|
|
searchables: []
|
|
searchables: []
|
|
@@ -470,6 +472,7 @@
|
|
|
that.header.formatters.push(column.formatter);
|
|
that.header.formatters.push(column.formatter);
|
|
|
that.header.events.push(column.events);
|
|
that.header.events.push(column.events);
|
|
|
that.header.sorters.push(column.sorter);
|
|
that.header.sorters.push(column.sorter);
|
|
|
|
|
+ that.header.sortNames.push(column.sortName);
|
|
|
that.header.cellStyles.push(column.cellStyle);
|
|
that.header.cellStyles.push(column.cellStyle);
|
|
|
that.header.clickToSelects.push(column.clickToSelect);
|
|
that.header.clickToSelects.push(column.clickToSelect);
|
|
|
that.header.searchables.push(column.searchable);
|
|
that.header.searchables.push(column.searchable);
|
|
@@ -638,6 +641,9 @@
|
|
|
|
|
|
|
|
if (index !== -1) {
|
|
if (index !== -1) {
|
|
|
this.data.sort(function (a, b) {
|
|
this.data.sort(function (a, b) {
|
|
|
|
|
+ if(that.header.sortNames[index]) {
|
|
|
|
|
+ name = that.header.sortNames[index];
|
|
|
|
|
+ }
|
|
|
var aa = a[name],
|
|
var aa = a[name],
|
|
|
bb = b[name],
|
|
bb = b[name],
|
|
|
value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]);
|
|
value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]);
|