kvision / pl.treksoft.kvision.table / Table

Table

open class Table : SimplePanel

HTML table component.

Constructors

<init>

Table(headerNames: List<String>? = null, types: Set<TableType> = setOf(), caption: String? = null, responsive: Boolean = false, classes: Set<String> = setOf(), init: Table.() -> Unit = null)

Properties

caption

var caption: String?

Table caption.

headerNames

var headerNames: List<String>?

Table headers names.

responsive

var responsive: Boolean

Determines if the table is responsive.

types

var types: Set<TableType>

Table types.

Functions

add

open fun add(child: Component): SimplePanel

Adds given component to the current container.

addAll

open fun addAll(children: List<Component>): SimplePanel

Adds a list of components to the current container.

addHeaderCell

fun addHeaderCell(cell: HeaderCell): Table

Adds new header cell to the table.

childrenVNodes

open fun childrenVNodes(): Array<VNode>

Returns the array of the children Snabbdom vnodes.

getChildren

open fun getChildren(): List<Component>

Returns a list of children of the current container.

getSnClass

open fun getSnClass(): List<StringBoolPair>

Returns list of CSS class names for current widget in the form of a List.

remove

open fun remove(child: Component): SimplePanel

Removes given component from the current container.

removeAll

open fun removeAll(): SimplePanel

Removes all children from the current container.

removeHeaderCell

fun removeHeaderCell(cell: HeaderCell): Table

Removes given header cell from the table.

removeHeaderCells

fun removeHeaderCells(): Table

Removes all header cells from table.

render

open fun render(): VNode

Renders current component as a Snabbdom vnode.

Inherited Functions

addInternal

fun addInternal(child: Component): SimplePanel

Protected and final method to add given component to the current container.

Companion Object Functions

table

fun Container.table(headerNames: List<String>? = null, types: Set<TableType> = setOf(), caption: String? = null, responsive: Boolean = false, classes: Set<String> = setOf(), init: Table.() -> Unit = null): Table

DSL builder extension function.