dataTable

fun <T, I> RenderContext.dataTable(    styling: GridParams.() -> Unit = {},     rows: RootStore<List<T>>,     rowIdProvider: (T) -> I,     baseClass: StyleClass = StyleClass.None,     id: String? = null,     prefix: String = DataTableComponent.prefix,     build: DataTableComponent<T, I>.() -> Unit = {})

This component factory generates a data table.

It provides the following main functions:

  • automatic scrolling enabled by default including a fixed header, so this line always remains visible

  • sorting facility including easily defining specific type based sorting for each column separately (lexicographic sorting is the default, thus String based

  • default styling via fritz2's dev.fritz2.styling.theme.Theme infrastructure

  • variety of custom styling for header and cells, row based or column based

  • styling based upon the index and current stateful information like the sorting or selection state.

  • custom content for header and column cells including access to current row data

  • different modes for selecting rows (checkbox and click based) and separation between single or multiple selection

See also

Parameters

styling

a lambda expression for declaring the styling as fritz2's styling DSL

rows

the required store holding the data rows that should be rendered by the table

rowIdProvider

an appropriate id provider for the specific row type `T` (typically some sort of Id property)

baseClass

optional CSS class that should be applied to the element

id

the ID of the element

prefix

the prefix for the generated CSS class resulting in the form $prefix-$hash

build

a lambda expression for setting up the component itself. Details in DataTableComponent


fun <T, I> RenderContext.dataTable(    styling: GridParams.() -> Unit = {},     rows: RootStore<List<T>>,     rowIdProvider: (T) -> I,     selection: Store<List<T>>,     baseClass: StyleClass = StyleClass.None,     id: String? = null,     prefix: String = DataTableComponent.prefix,     build: DataTableComponent<T, I>.() -> Unit = {})

This component factory generates a data table.

It provides the following main functions:

  • automatic scrolling enabled by default including a fixed header, so this line always remains visible

  • sorting facility including easily defining specific type based sorting for each column separately (lexicographic sorting is the default, thus String based

  • default styling via fritz2's dev.fritz2.styling.theme.Theme infrastructure

  • variety of custom styling for header and cells, row based or column based

  • styling based upon the index and current stateful information like the sorting or selection state.

  • custom content for header and column cells including access to current row data

  • different modes for selecting rows (checkbox and click based) and separation between single or multiple selection

See also

Parameters

styling

a lambda expression for declaring the styling as fritz2's styling DSL

rows

the required store holding the data rows that should be rendered by the table

rowIdProvider

an appropriate id provider for the specific row type `T` (typically some sort of Id property)

selection

a store that holds arbitrary rows that get selected

baseClass

optional CSS class that should be applied to the element

id

the ID of the element

prefix

the prefix for the generated CSS class resulting in the form $prefix-$hash

build

a lambda expression for setting up the component itself. Details in DataTableComponent


fun <T, I> RenderContext.dataTable(    styling: GridParams.() -> Unit = {},     rows: RootStore<List<T>>,     rowIdProvider: (T) -> I,     selection: Store<T?>,     baseClass: StyleClass = StyleClass.None,     id: String? = null,     prefix: String = DataTableComponent.prefix,     build: DataTableComponent<T, I>.() -> Unit = {})

This component factory generates a data table.

It provides the following main functions:

  • automatic scrolling enabled by default including a fixed header, so this line always remains visible

  • sorting facility including easily defining specific type based sorting for each column separately (lexicographic sorting is the default, thus String based

  • default styling via fritz2's dev.fritz2.styling.theme.Theme infrastructure

  • variety of custom styling for header and cells, row based or column based

  • styling based upon the index and current stateful information like the sorting or selection state.

  • custom content for header and column cells including access to current row data

  • different modes for selecting rows (checkbox and click based) and separation between single or multiple selection

See also

Parameters

styling

a lambda expression for declaring the styling as fritz2's styling DSL

rows

the required store holding the data rows that should be rendered by the table

rowIdProvider

an appropriate id provider for the specific row type `T` (typically some sort of Id property)

selection

a store that holds at most one row that gets selected

baseClass

optional CSS class that should be applied to the element

id

the ID of the element

prefix

the prefix for the generated CSS class resulting in the form $prefix-$hash

build

a lambda expression for setting up the component itself. Details in DataTableComponent