fix list sort issues
This commit is contained in:
parent
c9de18d9f8
commit
69552399a3
1 changed files with 10 additions and 8 deletions
|
@ -116,19 +116,21 @@ oml.ui.list = function() {
|
||||||
oml.UI.set({listSelection: data.ids});
|
oml.UI.set({listSelection: data.ids});
|
||||||
},
|
},
|
||||||
oml_find: function() {
|
oml_find: function() {
|
||||||
|
/*
|
||||||
|
that.options({sort: ...}) reloads the list,
|
||||||
|
but does not update the number of items
|
||||||
|
*/
|
||||||
if (ui.listView == oml.UI.getPrevious().listView) {
|
if (ui.listView == oml.UI.getPrevious().listView) {
|
||||||
if (
|
if (
|
||||||
JSON.stringify(ui.listSort)
|
JSON.stringify(ui.listSort)
|
||||||
!= JSON.stringify(oml.UI.getPrevious().listSort)
|
== JSON.stringify(oml.UI.getPrevious().listSort)
|
||||||
) {
|
) {
|
||||||
/*
|
that.reloadList();
|
||||||
that.options({sort: ...}) would already reload
|
} else {
|
||||||
the list, but not update the number of items
|
that.options({
|
||||||
*/
|
sort: Ox.clone(ui.listSort, true)
|
||||||
var options = that.options();
|
});
|
||||||
options.sort = Ox.clone(ui.listSort, true);
|
|
||||||
}
|
}
|
||||||
that.reloadList();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
oml_item: function() {
|
oml_item: function() {
|
||||||
|
|
Loading…
Reference in a new issue