DataTableComponent

open class DataTableComponent<T, I>(val dataStore: RootStore<List<T>>, rowIdProvider: (T) -> I) : Component<Unit> , DataTableContext<T, I>

This class implements the core of the data table.

It handles:

  • the rendering of the table (see all `render` prefixed methods)

  • the configuration (with sub-classes) and its DSL by delegation via DataTableContext

  • the state management like the current sorting or ordering of the columns with an internal store and lots of helper components like the whole infrastructure around the SortingPlan

  • the selection of row(s) with an internal store and the usage of SelectionStrategy implementations

  • the styling via theme and ad hoc definitions within the table column and header declarations

See also

Constructors

Link copied to clipboard
fun <T, I> DataTableComponent(dataStore: RootStore<List<T>>, rowIdProvider: (T) -> I)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun columns(styling: BoxParams.(IndexedValue<StatefulItem<T>>) -> Unit, expression: ColumnsContext<T>.() -> Unit)
Link copied to clipboard
open override fun header(styling: Style<BasicParams>, expression: HeaderContext.() -> Unit)
Link copied to clipboard
open override fun options(value: OptionsContext<T>.() -> Unit)
Link copied to clipboard
open override fun prependAdditionalColumns(expression: ColumnsContext<T>.() -> Unit)
Link copied to clipboard
open override fun render(    context: RenderContext,     styling: BoxParams.() -> Unit,     baseClass: StyleClass,     id: String?,     prefix: String)

Central method that should do the actual rendering of a component.

Link copied to clipboard
open override fun selection(value: SelectionContext<T, I>.() -> Unit)

Properties

Link copied to clipboard
open override val columns: ComponentProperty<ColumnsContext<T>>
Link copied to clipboard
val dataStore: RootStore<List<T>>
Link copied to clipboard
open override val events: ComponentProperty<EventsContext<T, I>.() -> Unit>
Link copied to clipboard
open override val header: ComponentProperty<HeaderContext>
Link copied to clipboard
open override val options: ComponentProperty<OptionsContext<T>>
Link copied to clipboard
open override val selection: ComponentProperty<SelectionContext<T, I>>
Link copied to clipboard
open override val selectionStore: RowSelectionStore<T, I>