Release Notes

Performance

This update has seen a number of updates focused at improving the performance of the table with large data sets. Nelow is a summary of areas of performance improvement.

Data Loading Performance

Data loading has now been optimised, and you should see around a 3x - 4x reduction in processing times when data is loaded into the table. This will be particularly noticable data sets with a large number of rows.

Numeric Sorting

The number sorter has been rebuilt to improve performance when working with simple integer and floating point numbers. By default it will no longer try and do any string manipulation on numbers being sorted (eg removing thousand seperators etc). This has resulted in a 7x reduction in numeric sort times.

You can still carry out string processing in the number sorter if needed, using the optional thousandSeperator and decimalSeperator properties in the sorters sorterParams.

Calculation Column Scrolling

The column calculation module has been tweaked to improve horizontal scroll performance when column calculation rows are visible.

Cell Container Initialization

Intialization of event binding and styling on cells now happens without the need to generate the cell contents.

ESM Module

Minified File

A new tabulator.es2015.min.js file is available in the /dist/js/ folder, that provides a minified version of the tabulator.es2015.js file.

Menus

Nested Menus

It is now possible to build out more complex menu systems by using nested sub menus. To add a sub menu to an item, set the menu property with an array of menu items.

Sub menus can be nested as many layers deep as you need.

var table = new Tabulator("#example-table", {
    rowContextMenu: [
        {
            label:"Hide Column",
            action:function(e, column){
                column.hide();
            }
        },
        {
            label:"Sub Menu" //sub menu
            menu:[
                {
                    label:"Do Something"
                    action:function(e, column){
                        //do something
                    }
                },
                {
                    label:"Do Something Else"
                    action:function(e, column){
                        //do something else
                    }
                },
                {
                    label:"Deeper Sub Menu" //sub menu nested in sub menu
                    menu:[
                        {
                            label:"Do Another Thing"
                            action:function(e, column){
                                //do another thing
                            }
                        },
                    ]
                }
            ]
        }
    ]
});

Callback Context

All menu generation callbacks now have the Tabulator object for the table passed in as the this context of the callback

var headerMenu = function(component, e)){
    var columns = this.getColumns();
};

Updated Example

The Menus example has been updated to demonstrate the new nested menu functionality as well as a column visibility picker in the column header menu.

Columns

Maximum Column Width

Maximum Column Width

It is possible to set a maximum column width to prevent resizing columns from becoming too wide.

This can be set globally, by setting the columnMaxWidth option to the column width when you create your Tabulator.

var table = new Tabulator("#example-table", {
    columnMaxWidth:300, //maximum column width of 300px
});

This option can be overridden on a per column basis by setting the maxWidth property on the column definition.

{title:"name", field:"name", maxWidth:200} //set maximum column width to 200px

If you have defined the max column width globally using the columnMaxWidth option, then you can disable it on a per column basis by passing the value false to the maxWidth option in the column definition.

var table = new Tabulator("#example-table", {
    columnMaxWidth:300, //maximum column width of 300px
    columns:[
        {title:"name", field:"name", maxWidth:false} //remove max width on this column
    ]
});

Formatters

Image Formatter

The image formattter has a couple of new params to help customise the source URL of the image

URL Prefix

The urlPrefix option prepends a string to the start of the cell value when generating the image src url

{title:"Example", field:"example", formatter:"image", formatterParams:{
    urlPrefix:"http://website.com/images/", //prepend this string to the start of the image url
}}

URL Suffix

The urlSuffix option prepends a string to the start of the cell value when generating the image src url

{title:"Example", field:"example", formatter:"image", formatterParams:{
    urlSuffix:".png",, //append this string to the end of the image url
}}

Editors

Chrome Focus Outline

All themes have been updaed to remove the thick black outline applied to focused editors in the latest releases of Chrome.

Select Editor

Keyboard Navigation

You can now navigate the list in the select editor by typing the value u are loking for on the keyboard while the editor is open, the edtior will do a string comparison of the typed word against each label to find a labe that starts with the typed word and will then scroll to that item.

After 800 milliseconds of inactivity the search word will reset and the next key press will trigger a new search. The search will only work with alphanumeric characters.

Filtering

Refresh Current Filters

You can now trigger a refresh of the current filters using the refreshFilter function. This function will cause the current filters to be run again and applied to the table data.

This is mainly useful when you are using custom filter functions that use variables from outside of Tabulator to determine what is filtered, when these variables change you can then call the refreshFilter function to update the existing filters.

table.refreshFilters();

History

Clear History

The clearHistory function can be used to clear out the current table interaction history.

table.clearHistory();

Column Groups

Horizontal Alignment

By default column group header titles are left aligned. you can now use the headerHozAlign option to change this in a column groups definition:

var table = new Tabulator("#example-table", {
    columns:[
        {title:"Name", field:"name", width:160},
        {
            title:"Work Info",
            headerHozAlign:"center", //center align text in column group header
            columns:[
                {title:"Progress", field:"progress"},
                {title:"Rating", field:"rating"},
            ],
        },
    ],
});

Ajax

ajaxURLGenerator Function Scope

The ajaxURLGenerator function is now called with the scope of the table so you can now access the parent table on the this variable

var table = new Tabulator("#example-table", {
    ajaxURLGenerator:function(url, config, params){
        this //The table this function is being called on
    },
});

Bug Fixes

V4.9.0 Release

The following minor updates and bugfixes have been made:

  • The sortValuesList parameter on the select editor now works correctly for all types of value list.
  • The footer calculation row in the bootstrap4 theme is now correctly styled when the table-dark class is applied to the table.
  • Fixed issue with paginated tables that under certain circumstances caused a "Maximum call stack size exceeded" error in the adjustTableSize function.
  • The fetch error object is now correctly passed to the catch on the setData functions returned promise.
  • Fixed regression in last release that was causing formatters to be fired twice on cells that contained editors.
  • The progress editor now takes acount of cell padding when working out the editor value.
  • Fixed issue with column group widths not persisting when column peristence is enabled and table layout mode is set to fitDataFill
  • Column groups now corretly retain all definition options when restored from config persistence.
  • Responsive Collapse columns now correctly pull titles from the localization module.

V4.9.1 Release

The following minor updates and bugfixes have been made:

  • Fixed regression with the select editor causing all values in the list to be displayed as true when the values property of the editorParam object was set to true