Browse Source

Update bootstrap-table.js

localeCompare number fix
arifemre 11 years ago
parent
commit
c8e09d45bf
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/bootstrap-table.js

+ 7 - 1
src/bootstrap-table.js

@@ -504,7 +504,13 @@
                 if (bb === undefined || bb === null) {
                     bb = '';
                 }
-
+                
+                if ($.isNumeric(aa) && $.isNumeric(bb)) {
+                    if (aa < bb)
+                        return order * -1;
+                    return order;
+                }
+                
                 if (aa === bb) {
                     return 0;
                 }