SelectionContext

class SelectionContext<T, I>

This context class configures the selection capabilities of the data table.

One can choose the type of the selection (selectionMode):

  • single for only allowing at most one column to be selected

  • multi for selecting an arbitrary amount of rows

  • omitting the configuration for disabling selection at all

Besides the pure selection type, also the method of selecting (strategy) can be configured:

  • selection by clicking onto a row

  • selection by checking a checkBox that gets rendered at the front of the table in an extra column

  • some custom strategy (by implementing the SelectionStrategy interface)

The selection type chooses the strategy automatically if omitted:

  • single -> by click

  • multi -> by checkBox

Be aware that the selection configuration is predetermined by the passing of an external store into the factory functions! The selection gets enabled and chosen depending of the type of the store:

Constructors

SelectionContext
Link copied to clipboard
js
fun SelectionContext()

Types

Multi
Link copied to clipboard
js
class Multi<T>
Single
Link copied to clipboard
js
class Single<T>
StrategyContext
Link copied to clipboard
js
object StrategyContext

Functions

multi
Link copied to clipboard
js
fun multi(value: SelectionContext.Multi<T>.() -> Unit)
single
Link copied to clipboard
js
fun single(value: SelectionContext.Single<T>.() -> Unit)
strategy
Link copied to clipboard

Properties

selectionMode
Link copied to clipboard
js
val selectionMode: SelectionMode
strategy
Link copied to clipboard
js
val strategy: ComponentProperty<SelectionStrategy<T, I>?>