DataTableComponent

open class DataTableComponent<T, I>(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

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

Types

Companion
Link copied to clipboard
js
object Companion

Functions

columns
Link copied to clipboard
js
open override fun columns(styling: BoxParams.(IndexedValue<StatefulItem<T>>) -> Unit, expression: ColumnsContext<T>.() -> Unit)
header
Link copied to clipboard
js
open override fun header(styling: Style<BasicParams>, expression: HeaderContext.() -> Unit)
options
Link copied to clipboard
js
open override fun options(value: OptionsContext<T>.() -> Unit)
prependAdditionalColumns
Link copied to clipboard
js
open override fun prependAdditionalColumns(expression: ColumnsContext<T>.() -> Unit)
render
Link copied to clipboard
js
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.
selection
Link copied to clipboard
js
open override fun selection(value: SelectionContext<T, I>.() -> Unit)

Properties

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