|
@@ -107,16 +107,13 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
|
|
// show sticky when top anchor touches header, and when bottom anchor not exceeded
|
|
// show sticky when top anchor touches header, and when bottom anchor not exceeded
|
|
|
if (top > start && top <= end) {
|
|
if (top > start && top <= end) {
|
|
|
// ensure clone and source column widths are the same
|
|
// ensure clone and source column widths are the same
|
|
|
- // this.$stickyHeader.find('tr:eq(0)').find('th').each((index, el) => {
|
|
|
|
|
- // $(el).css('min-width', this.$header.find('tr:eq(0)').find('th').eq(index).css('width'))
|
|
|
|
|
- // })
|
|
|
|
|
- // "y" axis
|
|
|
|
|
- this.$stickyHeader.find('tr').map(function(index, el) {
|
|
|
|
|
- var axis_x = $(el).find('th');
|
|
|
|
|
- axis_x.each(function(indexX, elX) {
|
|
|
|
|
- $__default['default'](elX).css('min-width', _this4.$header.find('tr:eq('+index+')').find('th:eq('+ indexX+')').css('width'));
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$stickyHeader.find('tr').each((indexRows, rows) => {
|
|
|
|
|
+ const columns = $(rows).find('th')
|
|
|
|
|
+
|
|
|
|
|
+ columns.each((indexColumns, celd) => {
|
|
|
|
|
+ $(celd).css('min-width', this.$header.find(`tr:eq(${indexRows})`).find(`th:eq(${indexColumns})`).css('width'))
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
// match bootstrap table style
|
|
// match bootstrap table style
|
|
|
this.$stickyContainer.show().addClass('fix-sticky fixed-table-container')
|
|
this.$stickyContainer.show().addClass('fix-sticky fixed-table-container')
|
|
|
// stick it in position
|
|
// stick it in position
|