Tabulator

open class Tabulator<T : Any>(    data: List<T>? = null,     dataUpdateOnEdit: Boolean = true,     val options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     kClass: KClass<T>? = null,     serializer: <Error class: unknown class><T>? = null,     module: <Error class: unknown class>? = null)

Tabulator component.

Parameters

T

type

data

a list of objects

dataUpdateOnEdit

determines if the data model is automatically updated after tabulator edit action

options

tabulator options

types

a set of table types

className

CSS class names

kClass

Kotlin class

serializer

the serializer for type T

module

optional serialization module with custom serializers

Constructors

Link copied to clipboard
fun <T : Any> Tabulator(    data: List<T>? = null,     dataUpdateOnEdit: Boolean = true,     options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     kClass: KClass<T>? = null,     serializer: <Error class: unknown class><T>? = null,     module: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun addColumn(    columnDefinition: ColumnDefinition<T>,     insertRightOfTarget: Boolean? = null,     positionTarget: String? = null)
open fun addColumn(    columnDefinition: Tabulator.ColumnDefinition,     insertRightOfTarget: Boolean? = null,     positionTarget: String? = null)

Add new column to the tabulator.

Link copied to clipboard
open fun afterDestroy()
Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
open fun applyFilter()

Applies the current filter.

Link copied to clipboard
open fun buildClassSet(classSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun clearData(): Unit?

Clears the data in the table.

Link copied to clipboard
open fun clearFilter(includeHeaderFilters: Boolean = true)

Clears current filters.

Link copied to clipboard
open fun clearHeaderFilter()

Clears header filters.

Link copied to clipboard
open fun clearSort()

Clears current sort.

Link copied to clipboard
open fun deleteColumn(name: String)

Delete column by name.

Link copied to clipboard
open fun deselectRow(row: dynamic = undefined)

Deselect the row.

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun downloadCSV(    fileName: String? = null,     dataSet: RowRangeLookup = RowRangeLookup.ACTIVE,     delimiter: Char = ',',     includeBOM: Boolean = false,     newTab: Boolean = false): Unit?

Download the table content as CSV

Link copied to clipboard
open fun downloadHTML(    fileName: String? = null,     dataSet: RowRangeLookup = RowRangeLookup.ACTIVE,     style: Boolean = false,     newTab: Boolean = false): Unit?

Download the table content as HTML

Link copied to clipboard
open fun downloadJSON(    fileName: String? = null,     dataSet: RowRangeLookup = RowRangeLookup.ACTIVE,     newTab: Boolean = false): Unit?

Download the table content as JSON

Link copied to clipboard
open fun getColumn(name: String): Tabulator.ColumnComponent?

Get column component by name.

Link copied to clipboard
open fun getData(rowRangeLookup: RowRangeLookup? = null): List<T>?

Returns the current data in the table.

Link copied to clipboard
open fun getDataCount(rowRangeLookup: RowRangeLookup? = null): Int

Get the number of data rows.

Link copied to clipboard
open fun getHistoryRedoSize(): Int

Get the number of history redo actions available.

Link copied to clipboard
open fun getHistoryUndoSize(): Int

Get the number of history undo actions available.

Link copied to clipboard
open fun getHtml(    rowRangeLookup: RowRangeLookup,     isStyled: Boolean = false,     htmlOutputConfig: dynamic = null): String?

Get the HTML code of the table.

Link copied to clipboard
open fun getPage(): Int

Returns current page number.

Link copied to clipboard
open fun getPageMax(): Int

Returns number of pages.

Link copied to clipboard
open fun getPageSize(): Int

Returns the size of a page.

Link copied to clipboard
open fun getSelectedData(): List<T>

Returns the selected data in the table.

Link copied to clipboard
open fun getSelectedRows(): List<Tabulator.RowComponent>

Returns the selected rows.

Link copied to clipboard
open fun navigateDown()

Navigate to the same cell in the row below.

Link copied to clipboard
open fun navigateLeft()

Navigate to the cell on the left.

Link copied to clipboard
open fun navigateNext()

Navigate to the next cell.

Link copied to clipboard
open fun navigatePrev()

Navigate to the previous cell.

Link copied to clipboard
open fun navigateRight()

Navigate to the cell on the right.

Link copied to clipboard
open fun navigateUp()

Navigate to the same cell in the row above.

Link copied to clipboard
open fun nextPage()

Navigate to the next page.

Link copied to clipboard
open fun previousPage()

Navigate to the previous page.

Link copied to clipboard
open fun print(    rowRangeLookup: RowRangeLookup,     isStyled: Boolean = false,     printConfig: dynamic = null): Unit?

Print the table.

Link copied to clipboard
open fun redo(): Boolean

Redo the last undone user action.

Link copied to clipboard
open fun redraw(force: Boolean = false)

Redraw the table (e.g. after a resize).

Link copied to clipboard
open fun reload()

Reload table data.

Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open fun replaceData(data: Array<T>)

Silently replaces the data in a table.

Link copied to clipboard
open fun scrollToRow(    row: Int,     position: RowPosition? = null,     ifVisible: Boolean? = null)

Scroll to the row given by id.

Link copied to clipboard
open fun selectRow(row: dynamic = undefined)

Select the row.

Link copied to clipboard
open fun setData(data: Array<T>)

Sets new data in a table.

Link copied to clipboard
open fun setFilter(filter: (T) -> Boolean)

Sets the external filter for the data.

Link copied to clipboard
open fun setHeight(height: Int)

Change the height of the table.

Link copied to clipboard
open fun setPage(page: Int)

Shows given page.

Link copied to clipboard
open fun setPageSize(size: Int)

Set the size of a page.

Link copied to clipboard
open fun setPageToRow(row: Int)

Shows page with a row given by id.

Link copied to clipboard
open fun toggleSelectRow(row: dynamic = undefined)

Toggle selection status of the row.

Link copied to clipboard
open fun undo(): Boolean

Undo the last user action.

Properties

Link copied to clipboard
var jsTabulator: Tabulator? = null

Native Tabulator object.

Link copied to clipboard
val options: TabulatorOptions<T>
Link copied to clipboard
var types: <Error class: unknown class>

Table types.