Bootstrap-table fixed table head, at the same time fit height, fixed row solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.