|
@@ -4,7 +4,6 @@
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
let initBodyCaller
|
|
let initBodyCaller
|
|
|
-let tableGroups
|
|
|
|
|
|
|
|
|
|
// it only does '%s', and return '' when arguments are undefined
|
|
// it only does '%s', and return '' when arguments are undefined
|
|
|
const sprintf = function (str) {
|
|
const sprintf = function (str) {
|
|
@@ -51,7 +50,7 @@ BootstrapTable.prototype.initSort = function (...args) {
|
|
|
_initSort.apply(this, Array.prototype.slice.apply(args))
|
|
_initSort.apply(this, Array.prototype.slice.apply(args))
|
|
|
|
|
|
|
|
const that = this
|
|
const that = this
|
|
|
- tableGroups = []
|
|
|
|
|
|
|
+ this.tableGroups = []
|
|
|
|
|
|
|
|
if ((this.options.groupBy) && (this.options.groupByField !== '')) {
|
|
if ((this.options.groupBy) && (this.options.groupByField !== '')) {
|
|
|
|
|
|
|
@@ -75,7 +74,7 @@ BootstrapTable.prototype.initSort = function (...args) {
|
|
|
|
|
|
|
|
let index = 0
|
|
let index = 0
|
|
|
$.each(groups, (key, value) => {
|
|
$.each(groups, (key, value) => {
|
|
|
- tableGroups.push({
|
|
|
|
|
|
|
+ this.tableGroups.push({
|
|
|
id: index,
|
|
id: index,
|
|
|
name: key,
|
|
name: key,
|
|
|
data: value
|
|
data: value
|
|
@@ -118,7 +117,7 @@ BootstrapTable.prototype.initBody = function (...args) {
|
|
|
visibleColumns += 1
|
|
visibleColumns += 1
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- tableGroups.forEach(item => {
|
|
|
|
|
|
|
+ this.tableGroups.forEach(item => {
|
|
|
const html = []
|
|
const html = []
|
|
|
|
|
|
|
|
html.push(sprintf('<tr class="info groupBy expanded" data-group-index="%s">', item.id))
|
|
html.push(sprintf('<tr class="info groupBy expanded" data-group-index="%s">', item.id))
|