So after a couple of months break to focus on setting up the new Tabulator website server, Im back with the 3.3 release, which is jam packed full of loads of new shiney features.
New Column Layout System
A new layout extension has been created to manage column layouts, provide new ways of laying out columns and even allow you to add your own column layout functions.
A new layout mode have been added, the fitDataFill mode is identical to the fit data mode, but ensures that rows are always at least the full width of the table.
For more information checkout the Layout Documentation
Input Validation
Tabulator now supports the use of validators to check that data entered in the table through an editor is valid before it is stored.
A wide range of build in validators are available to use with the new validator column definition object property. You can even build your own if you fancy it.
For more information checkout the Validation Documentation
Updated Group Functionality
The row grouping system has received some TLC and now has a load of additional features.
The getGroups function has been added to return a list of the current first level group components.
A number of click event calbacks have been added to give greater control of user interaction with groups, including groupClick, groupDblClick, groupContext, groupTap, groupDblTap, groupTapHold.
The new groupToggleElement option allows you to set which element the user should click to toggle the group open/closed.
The groupHeader and groupStartOpen functions are now passed the group component as a fourth argument.
For more information checkout the Grouping Data Documentation
Multi Column Header Sort
Holding down the ctrl or shift key when clicking on column headers will now allow you to sort by multiple columns at once.
For more information checkout the Sorting Documentation
Column Calculations Updates
The new groupClosedShowCalcs option allows you to keep column calculations in groups visible when the group is closed.
You can now apply formatters to column calculation cells using the topCalcFormatter, bottomCalcFormatter, topCalcFormatterParams, and bottomCalcFormatterParams options.
Mathematical calculations now cast strings to numbers for better accuracy.
Calculations in groups now updated when a cell in the group is edited.
For more information checkout the Column Calculations Documentation
Ajax Updates
The new gtAjaxUrl function lets you retrieve the tables current AJAX URL.
Returning a value of false from the ajaxRequesting will now abort an ajax request.
For more information checkout the AJAX Documentation
Ajax Sorting and Filtering
Ajax sorting and filtering has now been improved, with all sorters and filters (including header filters) being passed back in the ajax request. To cope with this update, new filters and sorters parameters are now passed with the ajax requests.
For more information checkout the Ajax Sorting and Ajax Filtering Documentation.
Filter Function Updates
The getFilter function has been renamed to getFilters and now has an optional second argument to retrieve header and programatic filters.
The getHeaderFilter function has been added to retreive an array of all current header filters.
Select All Filtered Rows
Passing a value of true into the first argument of the selectRow function will now select all filtered rows
For more information checkout the Selectable Rows Documentation
Insert New Data Anywhere In Table
The new addData function lets you insert new data into an existing data set anywhere you like.
For more information checkout the Editing & Manipulating Data Documentation
Component Obeject Updates
The restoreOldValue function has been added to the cell component to allow the cell to be revered to its previous value without tirggering cell edit callbacks.
For more information checkout the Cell Component Documentation
Pagination Updates
You can now call the getPageSize function to retreive the number of rows allowed on a page
For more information checkout the Pagination Documentation
Format Column Header Titles
You can now use the titleFormatter and titleFormatterParams options to apply formatters to column titles
For more information checkout the Formatting Documentation
Custom Download Column Titles
The new downloadTitle column defintion peroperty allows you to set the title of a column in a download
For more information checkout the Data Download Documentation
Export table data to HTML table
You can now export the contents of your table as an HTML formatted table if needed using the new getHtml function.
Version Numbers in Source Files
All source files now contain their version number to make it easier to track what code you are using when debugging.
General System Tweaks
A number of small tweaks have been made to the system including:
- Group headers now maintain width when all groups are closed
- Row handle formatter now vertically aligns to the center of the cell
- The getSort function has been renamed to getSorters to better fit in with naming convertion of other functions
- The tooltipHeader column definition property has been renamed to headerTooltip to better fit in with naming convertion of other column header properties
- Row Components are now passed to the dataSorted callback
- The getField function is now available on Cell Components in the header filter editor callbacks
- The like filter now correctly handles null or undefined values
- Fixed regression in 3.2 where the Cell Component getElement function was returning a DOM node, it now correctly returns a jQuery element
- Bootstrap tables now have a background color of #ffffff by defualt to prevent visual corruption of frozen columns
- Row Components are now correctly passed into sorter functions
- Functions on components have been moved into the objects respective prototypes to improve efficiency