Browse Source

Fix #229 Default Sort order is wrong if data-visible="false" is set on the field referenced by data-sort-name.

Dennis Hernández 10 years ago
parent
commit
e84d2e2f4a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/bootstrap-table.js

+ 4 - 0
src/bootstrap-table.js

@@ -479,6 +479,10 @@
                 isVisible = 'hidden';
 
             if (!column.visible) {
+                // Fix #229. Default Sort order is wrong if data-visible="false" is set on the field referenced by data-sort-name.
+                if (column.field === that.options.sortName) {
+                    that.header.fields.push(column.field);
+                }
                 return;
             }