ソースを参照

Merge branch 'develop' into fix/ajax-error

Dustin Utecht 6 年 前
コミット
e2a8c2316d
3 ファイル変更11 行追加10 行削除
  1. 2 1
      src/bootstrap-table.js
  2. 6 6
      src/themes/theme.scss
  3. 3 3
      src/utils/index.js

+ 2 - 1
src/bootstrap-table.js

@@ -422,7 +422,8 @@ class BootstrapTable {
             return order * value
             return order * value
           }
           }
 
 
-          return Utils.sort(aa, bb, order, this.options.sortStable)
+          return Utils.sort(aa, bb, order, this.options.sortStable,
+            a._position, b._position)
         })
         })
       }
       }
 
 

+ 6 - 6
src/themes/theme.scss

@@ -125,7 +125,7 @@
           background-color: $hover-bg;
           background-color: $hover-bg;
         }
         }
 
 
-        &.no-records-found {
+        &.no-records-found td {
           text-align: center;
           text-align: center;
         }
         }
 
 
@@ -146,12 +146,12 @@
 
 
         label {
         label {
           margin-bottom: 0;
           margin-bottom: 0;
-        }
-      }
 
 
-      input[type="radio"],
-      input[type="checkbox"] {
-        margin: 0 auto !important;
+          input[type="radio"],
+          input[type="checkbox"] {
+            margin: 0 auto !important;
+          }
+        }
       }
       }
 
 
       &.table-sm .th-inner {
       &.table-sm .th-inner {

+ 3 - 3
src/utils/index.js

@@ -271,7 +271,7 @@ export default {
     return data
     return data
   },
   },
 
 
-  sort (a, b, order, sortStable) {
+  sort (a, b, order, sortStable, aPosition, bPosition) {
     if (a === undefined || a === null) {
     if (a === undefined || a === null) {
       a = ''
       a = ''
     }
     }
@@ -280,8 +280,8 @@ export default {
     }
     }
 
 
     if (sortStable && a === b) {
     if (sortStable && a === b) {
-      a = a._position
-      b = b._position
+      a = aPosition
+      b = bPosition
     }
     }
 
 
     // If both values are numeric, do a numeric comparison
     // If both values are numeric, do a numeric comparison