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

Link copied to clipboard
fun SelectionContext()

Types

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

Functions

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

Properties

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