TextList: allow for not passing sort by making the unique key, and its operator, the default
This commit is contained in:
parent
b9ebb11d48
commit
9bf755a10d
1 changed files with 7 additions and 0 deletions
|
@ -108,6 +108,13 @@ Ox.TextList = function(options, self) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (Ox.isEmpty(self.options.sort)) {
|
||||||
|
self.options.sort = [{
|
||||||
|
key: self.unique,
|
||||||
|
operator: Ox.getObjectById(self.options.columns, self.unique).operator
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
Ox.extend(self, {
|
Ox.extend(self, {
|
||||||
columnPositions: [],
|
columnPositions: [],
|
||||||
defaultColumnWidths: self.options.columns.map(function(column) {
|
defaultColumnWidths: self.options.columns.map(function(column) {
|
||||||
|
|
Loading…
Reference in a new issue