update number of list items

This commit is contained in:
j 2014-10-31 14:52:58 +01:00
parent f5fb255e20
commit d3c8cdb572
2 changed files with 9 additions and 4 deletions

View File

@ -62,7 +62,7 @@ oml.ui.gridView = function() {
],
selected: ui.listSelection,
size: 128,
sort: ui.listSort,
sort: Ox.clone(ui.listSort, true),
unique: 'id'
})
.bindEvent({
@ -79,4 +79,4 @@ oml.ui.gridView = function() {
return that;
};
};

View File

@ -113,10 +113,15 @@ oml.ui.list = function() {
},
oml_find: function() {
if (ui.listView == oml.UI.getPrevious().listView) {
if (ui.listSort == oml.UI.getPrevious().listSort) {
if (JSON.stringify(ui.listSort) == JSON.stringify(oml.UI.getPrevious().listSort)) {
that.reloadList();
} else {
that.options({sort: ui.listSort});
//fixme: this reloads list twice.
//just setting sort will not update number of items
that.options({
sort: Ox.clone(ui.listSort, true)
});
that.reloadList();
}
}
},