this blog technology based on the reference Lazy blog Implementation of the technology
Original link:
JS Component Series-do-it-Yourself extend the frozen column function of bootstraptable: Solve the problem of height thoroughly
Thank you very much for this great God: lazy and restless
Lazy to make the left fixed and fit the fixed height, while in the above, this implementation right fixed, and implement the button event transfer, but there is no time to continue to achieve the appropriate fixed height.
I need to achieve the business needs of the table head, left and right column fixed, and appropriate height,
The implementation effect is as follows:
At the same time repaired when there is no fixed height after the effect of preventing style loss and overlap, blank, etc., that is, the data is too little, sliding box hidden, style will not be disorderly;
if (typeof ($ ('. Clearfix '))!== ' undefined ') {
var height = this. $tableBody. Height ()-
else{
var height = this. $tableBody. Height ();
if (!this. $body. Find (' > Tr[data-index] '). length} {this
. $rightFixedBody. Hide ();
return;
}
Such a code implementation effect;
Use configuration: Add the following configuration when Bootstrap-table is initialized. Remember to introduce JS plugin
Leftfixedcolumns:true,
leftfixednumber:1,
rightfixedcolumns:true,
rightfixednumber:1,
The modified Bootstrap-table-fixed-columns.js
, click on the above to download, if you have any questions contact me.
again, thank you very much for being lazy.
Original link:
JS Component Series-do-it-Yourself extend the frozen column function of bootstraptable: Solve the problem of height thoroughly
If there is infringement, please contact me delete; welcome reprint, but please indicate the source