Closed ikerfah closed 10 months ago
Thx 🤗
Yeap, you could use a state to animate-to or snap-to the specific cell.
If you do want to scroll the whole table (no matter on which row the user is), you could use underlying state of the MinaBox layout and animate to the max X value:
val scope = rememberCoroutineScope()
val state = rememberLazyTableState()
Button(
onClick = {
scope.launch {
state.animateToCell(
column = 4,
row = 4,
)
}
}
) {
Text("Center on cell (4, 4)")
}
Button(
onClick = {
scope.launch {
state.minaBoxState.animateTo(
x = state.minaBoxState.translate?.maxX ?: 0f
)
}
}
) {
Text("Focus last column")
}
https://github.com/oleksandrbalan/lazytable/assets/20944869/2d86543c-e81e-47bb-92da-43b5cc1669ec
Hi, Thanks foe the great work of that library!
Is it possible to programmatically scroll the table in a direction? let's say Horizontally. where I need to scroll to a specific items or scroll to the very right of the table
UPDATE Checked the code and managed to figure it out, I will keep it here in case someone needed it! 1.
2.
3.