does any1 know how to use the new Api LazyLayoutPinnableItem ?
myanmarking
03/23/2023, 12:04 PM
i want to use this functionality, but there is hardly any doc
myanmarking
03/23/2023, 12:14 PM
apparently, all you need is this inside your item block:
Copy code
val pinnableContainer = LocalPinnableContainer.current
DisposableEffect(pinnableContainer) {
val handle = pinnableContainer?.pin()
onDispose {
handle?.release()
}
}
And it should not recompose anymore when scrolling
myanmarking
03/23/2023, 12:16 PM
context: I have a screen with a complex chart as a header of a lazylist. I don’t want it to recompose everytime the scroll goes up and down. This API solves that!