is there already something like data tables?
# compose-desktop
x
is there already something like data tables?
k
I wouldn't be surprised if data tables (at the level of something like http://www.jidesoft.com/products/grids.htm) would emerge as a commercial offering if Compose Desktop gets enough exposure
In Swing, both
JXTable
from SwingX and
JideTable
from JIDE extend the core
JTable
component which operates at the level of renderers - where each cell is not a "live" component on its own, but rather rendered / painted from the same small set of configured renderers. This is done in order to keep the performance at an acceptable level. Editing a cell creates a separate "live" editor component that is positioned within the matching cell bounds.
Not sure if this approach is "feasible" with Compose
x
I think I build my own
Copy code
@Composable
fun CharacterList(
    character: List<Character>
) {
    character.map {
        Row {
            val boxModifier = Modifier.border(1.dp, Color.Black)
                .then(Modifier.padding(horizontal = 2.dp, vertical = 4.dp))
            Box(boxModifier) { Text(it.name) }
            Box(boxModifier) { Text(it.dna) }
            Box(boxModifier) { Text(it.dynasty) }
            Box(boxModifier) { Text(it.culture) }
            Box(boxModifier) { Text(it.religion) }
        }
    }
}
😄
k
Sure, now you need to make it work with thousands of rows, hundreds of columns, virtual pagination, sorting, filtering, searching, highlighting etc.
x
...wait? Are you saying my table composable is NOT perfect???
😄 2