Browse Source

Update initBody

Set row state field value when checked with a formatter function on table body init.
macias3 10 years ago
parent
commit
88af502c03
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/bootstrap-table.js

+ 2 - 0
src/bootstrap-table.js

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