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, selected: ui.listSelection,
size: 128, size: 128,
sort: ui.listSort, sort: Ox.clone(ui.listSort, true),
unique: 'id' unique: 'id'
}) })
.bindEvent({ .bindEvent({

View file

@ -113,10 +113,15 @@ oml.ui.list = function() {
}, },
oml_find: function() { oml_find: function() {
if (ui.listView == oml.UI.getPrevious().listView) { 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(); that.reloadList();
} else { } 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();
} }
} }
}, },