浏览代码

Update initBody

Set row state field value when checked with a formatter function on table body init.
macias3 10 年之前
父节点
当前提交
88af502c03
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/bootstrap-table.js

+ 2 - 0
src/bootstrap-table.js

@@ -1248,6 +1248,8 @@
                                 (value && value.disabled) ? 'disabled' : undefined) +
                                 (value && value.disabled) ? 'disabled' : undefined) +
                             ' />',
                             ' />',
                         that.options.cardView ? '</div>' : '</td>'].join('');
                         that.options.cardView ? '</div>' : '</td>'].join('');
+                        
+                    item[that.header.stateField] = value === true || (value && value.checked);
                 } else {
                 } else {
                     value = typeof value === 'undefined' || value === null ?
                     value = typeof value === 'undefined' || value === null ?
                         that.options.undefinedText : value;
                         that.options.undefinedText : value;