|
|
@@ -56,6 +56,18 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
|
|
.on('scroll', () => this.renderStickyHeader())
|
|
|
}
|
|
|
|
|
|
+ getCaret (...args) {
|
|
|
+ super.getCaret(...args)
|
|
|
+
|
|
|
+ if (this.$stickyHeader) {
|
|
|
+ const $ths = this.$stickyHeader.find('th')
|
|
|
+
|
|
|
+ this.$header.find('th').each((i, th) => {
|
|
|
+ $ths.eq(i).find('.sortable').attr('class', $(th).find('.sortable').attr('class'))
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
horizontalScroll () {
|
|
|
super.horizontalScroll()
|
|
|
this.$tableBody.on('scroll', () => this.matchPositionX())
|
|
|
@@ -108,9 +120,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
|
|
stickyHeaderOffsetLeft = 0
|
|
|
stickyHeaderOffsetRight = 0
|
|
|
}
|
|
|
- this.$stickyContainer.css('top', `${this.options.stickyHeaderOffsetY}`)
|
|
|
- this.$stickyContainer.css('left', `${stickyHeaderOffsetLeft}`)
|
|
|
- this.$stickyContainer.css('right', `${stickyHeaderOffsetRight}`)
|
|
|
+ this.$stickyContainer.css('top', `${this.options.stickyHeaderOffsetY}px`)
|
|
|
+ this.$stickyContainer.css('left', `${stickyHeaderOffsetLeft}px`)
|
|
|
+ this.$stickyContainer.css('right', `${stickyHeaderOffsetRight}px`)
|
|
|
// create scrollable container for header
|
|
|
this.$stickyTable = $('<table/>')
|
|
|
this.$stickyTable.addClass(this.options.classes)
|