Lin Min Phyo, your composition works fine on dev-...
# compose
v
Lin Min Phyo, your composition works fine on dev-06 (4.1-alpha02)
Copy code
......
SetContent{
    ......
    FullFeaturedTable()
    ......
}
  


@Composable
fun FullFeaturedTable() {
    val numbers = mutableListOf(1, 2, 100, 500)
    DataTable(
        columns = 1,
        sorting = DefaultDataTableSorting(
            sortableColumns = setOf(0),
            onSortRequest = { column , isAscending ->
                if (isAscending) {
                    numbers.sortBy { it }
                } else {
                    numbers.sortByDescending { it }
                }
            })
    ) {
        headerRow { Text(text = "Number") }
        for (number in numbers) {
            dataRow { Text("$number") }
        }
    }
}

@Preview
@Composable
fun FeaturedTable() {
    FullFeaturedTable()
}
­čžÁ 2
l
It is rendered well. ClassCastException happen when Sorting is made.
v
It seems that everything is ok without an exception.
Sorting responds with ClassCastException