Browse Source

Fix #1390: radio maintainSelected bug.

zhixin 10 years ago
parent
commit
8062df3fca
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bootstrap-table.js

+ 6 - 0
src/bootstrap-table.js

@@ -1606,6 +1606,12 @@
                 checked = $this.prop('checked'),
                 row = that.data[$this.data('index')];
 
+            if (that.options.maintainSelected && $(this).is(':radio')) {
+                $.each(that.options.data, function (i, row) {
+                    row[that.header.stateField] = false;
+                });
+            }
+
             row[that.header.stateField] = checked;
 
             if (that.options.singleSelect) {