OptionaladdOptionaleditThe editTriggerEvent option lets you choose which type of interaction event will trigger an edit on a cell.
var table = new Tabulator("#example-table", {
editTriggerEvent:"dblclick", // trigger edit on double click
});
This option can take one of three values:
- focus - trigger edit when the cell has focus (default)
- click - trigger edit on single click on cell
- dblclick - trigger edit on double click on cell
This option does not affect navigation behavior, cells edits will still be triggered when they are navigated to
through arrow keys or tabs.
OptionalfrozenFreeze rows of data
OptionalfrozenOptionalmovableTo allow the user to move rows up and down the table, set the movableRows parameter in the options:
OptionalmovableOptionalmovableTabulator also allows you to move rows between tables. To enable this you should supply either a valid CSS selector string a DOM node for the table or the Tabulator object for the table to the movableRowsConnectedTables option. if you want to connect to multiple tables then you can pass in an array of values to this option.
OptionalmovableThe movableRowsReceiver option should be set on the receiving tables, and sets the action that should be taken when the row is dropped into the table. There are several inbuilt receiver functions:
OptionalmovableThe movableRowsSender option should be set on the sending table, and sets the action that should be taken after the row has been successfully dropped into the receiving table. There are several inbuilt sender functions:
OptionalresizableAllows the user to control the height of columns in the table by dragging the border of the column.
These guides will only appear if the resizableRows option is enabled.
OptionalresizableAllows the user to control the height of rows in the table by dragging the bottom border of the row.
These guides will only appear on columns with the resizable option enabled in their column definition.
OptionalresizableYou can allow the user to manually resize rows by dragging the top or bottom border of a row. To enable this functionality, set the resizableRows property to true.
OptionalrowTabulator also allows you to define a row level formatter using the rowFormatter option. this lets you alter each row of the table based on the data it contains. The function accepts one argument, the RowComponent for the row being formatted.
OptionalrowWhen copying to the clipboard you may want to apply a different formatter may want to apply a different formatter from the one usually used to format the row. You can now do this using the rowFormatterClipboard table option, which takes the same inputs as the standard rowFormatter property. Passing a value of false into the formatter prevent the default row formatter from being run when the table is copied to the clipboard.
OptionalrowWhen the getHtml function is called you may want to apply a different formatter may want to apply a different formatter from the one usually used to format the row
OptionalrowWhen printing you may want to apply a different formatter may want to apply a different formatter from the one usually used to format the row.
OptionalscrollThe default option for triggering a ScrollTo on a visible element can be set using the scrollToRowIfVisible option. It can take a boolean value:
true - scroll to row, even if it is visible (default) false - scroll to row, unless it is currently visible, then don't move
OptionalscrollThe default ScrollTo position can be set using the scrollToRowPosition option. It can take one of four possible values:
top - position row with its top edge at the top of the table (default) center - position row with its top edge in the center of the table bottom - position row with its bottom edge at the bottom of the table nearest - position row on the edge of the table it is closest to
OptionalselectableThe selectableRange option can take one of a several values:
OptionalselectableIf you want the user to be able to clear the values for all cells in the active range by pressing the backspace or delete keys, then you can enable this behavior using the selectableRangeClearCells option:
OptionalselectableBy default the value of each cell in the range is set to undefined when this option is enabled and the user presses the backspace or delete keys. You can change the value the cells are set to using the selectableRangeClearCellsValue option
OptionalselectableBy default you can only select ranges by selecting cells on the table. If you would like to allow the user to select all cells in a column by clicking on the column header, then you can set the selectableRangeColumns option to true
OptionalselectableBy default you can only select ranges by selecting cells on the table. If you would like to allow the user to select all cells in row by clicking on the row header, then you can set the selectableRangeColumns option to true
OptionalselectableThe selectableRows option can take one of a several values:
OptionalselectableYou many want to exclude certain rows from being selected. The selectableRowsCheck options allows you to pass a function to check if the current row should be selectable, returning true will allow row selection, false will result in nothing happening. The function should accept a RowComponent as its first argument.
OptionalselectableBy default Tabulator will maintain selected rows when the table is filtered, sorted or paginated (but NOT when the setData function is used). If you want the selected rows to be cleared whenever the table view is updated then set the selectableRowsPersistence option to false.
OptionalselectableBy default you can select a range of rows by holding down the shift key and click dragging over a number of rows to toggle the selected state state of all rows the cursor passes over.
If you would prefer to select a range of row by clicking on the first row then holding down shift and clicking on the end row then you can achieve this by setting the selectableRowsRangeMode to click.
OptionalselectableBy default, row selection works on a rolling basis, if you set the selectableRows option to a numeric value then when you select past this number of rows, the first row to be selected will be deselected. If you want to disable this behavior and instead prevent selection of new rows once the limit is reached you can set the selectableRowsRollingSelection option to false.
OptionaltabAllows you to specify the behavior when the user tabs from the last editable cell on the last row of the table.
The position in the table for new rows to be added, "bottom" or "top".