ソースを参照

Added force-multiple-sort.bs.table event. It can be triggered to sort table after manual data changes.

Alexander Savchenko 9 年 前
コミット
891f507bac

+ 6 - 0
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -262,6 +262,12 @@
                 }
             });
 
+            this.$el.on('force-multiple-sort.bs.table', function() {
+                if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object' && that.options.sidePagination !== 'server') {
+                    that.onMultipleSort();
+                }
+            });
+
             this.$el.on('column-switch.bs.table', function(field, checked) {
                 for (var i = 0; i < that.options.sortPriority.length; i++) {
                     if (that.options.sortPriority[i].sortName === checked) {