ソースを参照

Fix #1390: radio maintainSelected bug.

zhixin 10 年 前
コミット
8062df3fca
1 ファイル変更6 行追加0 行削除
  1. 6 0
      src/bootstrap-table.js

+ 6 - 0
src/bootstrap-table.js

@@ -1606,6 +1606,12 @@
                 checked = $this.prop('checked'),
                 checked = $this.prop('checked'),
                 row = that.data[$this.data('index')];
                 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;
             row[that.header.stateField] = checked;
 
 
             if (that.options.singleSelect) {
             if (that.options.singleSelect) {