Shubham Singh
12/08/2024, 12:08 PMlazyRow
in https://github.com/rjaros/kilua/tree/main/examples/playground
Where can I find its usage? I can't seem to get it to do what I want.Robert Jaros
12/08/2024, 2:46 PMlazy-layouts
module in Kilua is a direct port of https://gitlab.com/opensavvy/ui/compose-lazy-html
You can check the documentation of the original libraryRobert Jaros
12/08/2024, 2:47 PMlazyRow
should work just like lazyColumn
, doesn't it?Robert Jaros
12/08/2024, 6:12 PMdiv {
border(1.px, style = BorderStyle.Solid, color = Color.Red)
height(50.px)
width(600.px)
overflow(Overflow.Auto)
lazyRow {
items(200) {
div {
width(30.px)
height(30.px)
border(1.px, BorderStyle.Solid, Color.Black)
+"$it"
}
}
}
}
Robert Jaros
12/08/2024, 6:12 PMlazyColumn
in the playground app.Shubham Singh
12/08/2024, 6:13 PMShubham Singh
12/08/2024, 6:14 PMsetup
callback does in this component? The DSL callback allows us to add items, but what does setup do?Robert Jaros
12/08/2024, 6:15 PMsetup()
function - it should be composable and it's not. Will have to fix that in the next release.Shubham Singh
12/08/2024, 6:15 PMShubham Singh
12/08/2024, 6:15 PMRobert Jaros
12/08/2024, 6:17 PMsetup
in the morning, it would already be fixed 😉Shubham Singh
12/08/2024, 6:17 PMhPanel
as a workaround
It's okay, I can wait for a while, replacing hPanel with lazyRow should be a task of a few seconds once it's fixed ✅Robert Jaros
12/08/2024, 6:34 PMsetup()
function
div {
border(1.px, style = BorderStyle.Solid, color = Color.Red)
height(100.px)
width(600.px)
overflowY(Overflow.Hidden)
overflowX(Overflow.Auto)
lazyRow({
height(100.px)
columnGap(1.px)
alignItems(AlignItems.Center)
}) {
items(200) {
div {
width(30.px)
height(30.px)
border(1.px, BorderStyle.Solid, Color.Black)
+"$it"
}
}
}
}
Robert Jaros
12/08/2024, 6:35 PM