TableScope

sealed interface TableScope<R>

Declares the columns of a Table. Each column call appends one column, in call order.

The receiver type parameter R is the table's row type; a column's column value extractor, cellContent body and onCellEdit callback are expressed in terms of R.

See also

Functions

Link copied to clipboard
abstract fun addColumn(header: @Nls String, columnClass: Class<*>, isEditable: Boolean, isCellEditable: (row: R, rowIndex: Int) -> Boolean?, isSortable: Boolean, comparator: Comparator<Any?>?, minWidth: Int, maxWidth: Int, onCellEdit: (row: R, rowIndex: Int, newValue: Any?) -> Unit, cellContent: @Composable TableCellScope.(row: R) -> Unit?, value: (row: R) -> Any?)

Appends one fully specified column. Both forms of column funnel through here, each filling in what a declaration leaves out.

Link copied to clipboard
inline fun <R, V : Any> TableScope<R>.column(header: @Nls String, isEditable: Boolean = false, noinline isCellEditable: (row: R, rowIndex: Int) -> Boolean? = null, isSortable: Boolean = true, comparator: Comparator<Any?>? = null, minWidth: Int = COLUMN_MIN_WIDTH, maxWidth: Int = COLUMN_MAX_WIDTH, noinline onCellEdit: (row: R, rowIndex: Int, newValue: V?) -> Unit = { _, _, _ -> }, noinline cellContent: @Composable TableCellScope.(row: R) -> Unit? = null, noinline value: (row: R) -> V?)

Declares one column of V values, taking the column's class from the type value returns.

fun <R> TableScope<R>.column(header: @Nls String, columnClass: Class<*>, isEditable: Boolean = false, isCellEditable: (row: R, rowIndex: Int) -> Boolean? = null, isSortable: Boolean = true, comparator: Comparator<Any?>? = null, minWidth: Int = COLUMN_MIN_WIDTH, maxWidth: Int = COLUMN_MAX_WIDTH, onCellEdit: (row: R, rowIndex: Int, newValue: Any?) -> Unit = { _, _, _ -> }, cellContent: @Composable TableCellScope.(row: R) -> Unit? = null, value: (row: R) -> Any?)

Declares one column of columnClass values.