jQuery Table Plugin Bootstrap Table
Add-ons

Plugin Description: Bootstrap Table displays data in table format and provides extensive features, including radio buttons, checkboxes, sorting, pagination, and more.
For detailed usage instructions, please refer to the demo, which provides comprehensive explanations.
Updated on 2016-10-26 (Fixed errors in the demo file and incorrect reference paths in the downloaded files)
Note: An external JSON file is loaded. Local preview may encounter cross-origin issues, so it needs to be run on a server.
The following is provided byMorning Breeze-Provides
Bug Description
When setting the field formatter using tag attributes, it was found that it had no effect:
Example: <th data-field="sex" data-formatter="format_sex">Gender</th>
Cause:
In bootstrap-table.js, line 399, the code only checks whether the formatter type is function.
Solution:
Modify the code block on line 399:
Before modification
1 2 3 | if (typeof that.header.formatters[j] === 'function') { value = that.header.formatters[j](value, item);} |
After modification:
1 2 3 4 5 6 7 | if (typeof that.header.formatters[j] === 'function') { value = that.header.formatters[j](value, item); }else if(typeof that.header.formatters[j] === 'string') { if(typeof window[that.header.formatters[j]] === 'function') { value = window[that.header.formatters[j]](value, item); } } |
评论