only sort object keys in treelist
This commit is contained in:
parent
6847102507
commit
888bf094ad
1 changed files with 2 additions and 3 deletions
|
@ -173,10 +173,9 @@ Ox.TreeList = function(options, self) {
|
||||||
if (type == 'array' || type == 'object') {
|
if (type == 'array' || type == 'object') {
|
||||||
ret.title += Ox.toTitleCase(type)
|
ret.title += Ox.toTitleCase(type)
|
||||||
+ ' <span class="OxLight">[' + Ox.len(value) + ']</span>';
|
+ ' <span class="OxLight">[' + Ox.len(value) + ']</span>';
|
||||||
ret.items = Ox.sort(
|
ret.items = type == 'array' ? value.map(function(v, i) {
|
||||||
type == 'array' ? value.map(function(v, i) {
|
|
||||||
return parseData(i, v);
|
return parseData(i, v);
|
||||||
}) : Object.keys(value).map(function(k) {
|
}) : Ox.sort(Object.keys(value)).map(function(k) {
|
||||||
return parseData(k, value[k]);
|
return parseData(k, value[k]);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue