Implementation of selecting all in the drop-down box of bootstrap-table display column

ask for help: how to select all in the drop-down box of the fields that can be displayed in the bootstrap-table list?

clipboard.png

clipboard.png


fill in the hole for yourself.
solution:
1, add "Select all" to the column parameter configuration

columns: [
        {
            title: '',
            field: '',
            visible: false,
        },
        
    ]

2.bootstrap-table rendering

$("-sharptb_transitList").bootstrapTable(newOption);

3. Add click event

var checkOne = $(".dropdown-menu li input");
var checkAll = checkOne.eq(0);
checkAll.off('click').on('click', function () {
    var flag = checkAll.prop("checked");
    checkOne.each(function(i){
        if (i>0){
            var $this = $(this);
            if (flag) {
                if (!$this.prop('checked')) {
                    $this.click();
                }
            } else {
                if ($this.prop('checked')) {
                    $this.click();
                }
            }
        }
    });
});
checkOne.on('click', function () {
    var len = checkOne.length;
    var _l = 0;
    checkOne.each(function(i){
        if (i>0){
            if ($(this).prop('checked')) {
                _lPP;
            }
        }
    });
    if (_l === len-1){
        checkAll.prop("checked", true)
    } else {
        checkAll.prop("checked", false)
    }
});
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30e19-2bd47.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30e19-2bd47.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?