Browse Source

recreate list on list change, to avoid doulbe reload if list sort changes too

j 1 year ago
parent
commit
e0c2ccbb24
2 changed files with 5 additions and 1 deletions
  1. 2
    1
      static/js/list.js
  2. 3
    0
      static/js/listPanel.js

+ 2
- 1
static/js/list.js View File

@@ -144,7 +144,8 @@ oml.ui.list = function() {
144 144
                     oml.UI.set({listSelection: data.ids});
145 145
                 },
146 146
                 oml_find: function() {
147
-                    that.reloadList();
147
+                    // list gets recreated in listPanel to avoid double reload if list and listSort changes
148
+                    // that.reloadList();
148 149
                 },
149 150
                 oml_item: function() {
150 151
                     if (!ui.item) {

+ 3
- 0
static/js/listPanel.js View File

@@ -27,6 +27,9 @@ oml.ui.listPanel = function() {
27 27
             orientation: 'vertical'
28 28
         })
29 29
         .bindEvent({
30
+            oml_find: function() {
31
+                that.replaceElement(1, oml.$ui.list = oml.ui.list());
32
+            },
30 33
             oml_listview: function() {
31 34
                 that.replaceElement(1, oml.$ui.list = oml.ui.list());
32 35
             },