ソースを参照

Fix condition to add levels in showSortModal

dimbslmh 10 年 前
コミット
f790c793c1

+ 5 - 3
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -141,9 +141,11 @@
                 }
             }
             
-            if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') {
-                for (var i = 0; i < that.options.sortPriority.length; i++) {
-                    that.addLevel(i, that.options.sortPriority[i]);
+            if (that.options.sortPriority !== null) {
+                if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') {
+                    for (var i = 0; i < that.options.sortPriority.length; i++) {
+                        that.addLevel(i, that.options.sortPriority[i]);
+                    }
                 }
             } else {
                 that.addLevel(0);