Column

data class Column<T>(    val id: String,     val lens: Lens<T, String>? = null,     val title: String = "",     val minWidth: Property? = null,     val maxWidth: Property? = null,     val hidden: Boolean = false,     val position: Int = 0,     val sorting: Sorting = Sorting.NONE,     val sortBy: Comparator<T>? = null,     val styling: BasicParams.(value: IndexedValue<StatefulItem<T>>) -> Unit = { _ -> },     val content: Td.(value: IndexedValue<StatefulItem<T>>, cellStore: Store<String>?, rowStore: SubStore<List<T>, T>) -> Unit,     val headerStyling: BasicParams.(sorting: Sorting) -> Unit = {},     val headerContent: Div.(column: Column<T>) -> Unit)

Main class to define the representation of the data class `T` of one table column. This class mainly is the result of the DSL configuration of the datatable.

Besides the main properties like the header title string or the Lens to grab the current String representation of the row data during the rendering process, one can also specify the sorting algorithm to fit the specific type (like a Date for example) or the appearance of the cell styling and content or the header styling and content.

Constructors

Link copied to clipboard
fun <T> Column(    id: String,     lens: Lens<T, String>? = null,     title: String = "",     minWidth: Property? = null,     maxWidth: Property? = null,     hidden: Boolean = false,     position: Int = 0,     sorting: Sorting = Sorting.NONE,     sortBy: Comparator<T>? = null,     styling: BasicParams.(value: IndexedValue<StatefulItem<T>>) -> Unit = { _ -> },     content: Td.(value: IndexedValue<StatefulItem<T>>, cellStore: Store<String>?, rowStore: SubStore<List<T>, T>) -> Unit,     headerStyling: BasicParams.(sorting: Sorting) -> Unit = {},     headerContent: Div.(column: Column<T>) -> Unit)

Properties

Link copied to clipboard
val content: Td.(value: IndexedValue<StatefulItem<T>>, cellStore: Store<String>?, rowStore: SubStore<List<T>, T>) -> Unit
Link copied to clipboard
val headerContent: Div.(column: Column<T>) -> Unit
Link copied to clipboard
val headerStyling: BasicParams.(sorting: Sorting) -> Unit
Link copied to clipboard
val hidden: Boolean = false
Link copied to clipboard
val id: String
Link copied to clipboard
val lens: Lens<T, String>? = null
Link copied to clipboard
val maxWidth: Property? = null
Link copied to clipboard
val minWidth: Property? = null
Link copied to clipboard
val position: Int = 0
Link copied to clipboard
val sortBy: Comparator<T>? = null
Link copied to clipboard
val sorting: Sorting
Link copied to clipboard
val styling: BasicParams.(value: IndexedValue<StatefulItem<T>>) -> Unit
Link copied to clipboard
val title: String