简体   繁体   中英

Tabulator: groupToggleElement breaking layout

Currently making a Table in Tabulator works fine, however when I add "groupToggleElement: "header" " it breaks the layout option of the Tabulator.

I'm unsure if I'm doing something wrong or if it's a bug.


 table = new Tabulator("#myTable", {
        pagination: "local",
        paginationSize: 30,
        movableColumns: true,
        resizableRows: true,
        initialSort: [
            { column: "FullName", dir: "asc" },
        ],
        groupBy: "FullName",
        groupStartOpen: false,
        groupToggleElement: "header",
        layout: "fitDataFill",
        layoutColumnsOnNewData: true,
        columns: [
            { title: "Name", field: "FullName", sorter: "string", align: "center" },
            { title: "Activation Key", field: "ActivationKey", sorter: "string", align: "center" },
            {
                title: "Expiry Date", field: "SubscriptionExpiryDate", sorter: "string", align: "center", formatter: "datetime", formatterParams: {
                    inputFormat: "YYYY-MM-DDT hh:mm:ss",
                    outputFormat: "DD/MMM/YYYY",
                    invalidPlaceholder: "No Expiry Date",
                }
            },
            { title: "Device Points", field: "Seats", sorter: "number", align: "center" }
        ]
    });

    $.ajax({
        url: "../API/Analytics/GetCustomerData",
        type: "get",
        async: true,
        success: function (data) {
            table.setData(data.dataObject);
        },
        error: function () {
            // error thing here
        },
        timeout: 10000
    });


Call

table.redraw(true) to redraw the table on changes

http://tabulator.info/docs/4.3/layout#redraw

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM