rememberTableState

@Composable
fun rememberTableState(initialSelectedRowIndices: Set<Int> = emptySet()): TableState

Creates and remembers a TableState starting on initialSelectedRowIndices.

A later change to initialSelectedRowIndices neither recreates the state nor moves the selection; select afterwards through the returned state's TableState.selectedRowIndices.

Parameters

initialSelectedRowIndices

the rows selected until the caller or the user moves the selection.