Reorderable icon indicating copy to clipboard operation
Reorderable copied to clipboard

Rendering flash when calling scrollToItem and animateScrollToItem on the LazyColumn's state

Open dsrees opened this issue 9 months ago • 2 comments

We've noticed quick flash with all items in the List after calling state.scrollToItem or state.animateScrollToItem that is only present when the item is wrapped in a ReorderableItem. I've been able to reproduce this with the Simple Reorderable LazyColumn demo by adding top/bottom buttons outside of the list that invoke scrollToItem

// Changes made to `SimpleReorderableLazyColumnScreen`
Column {
        Row {
            Button(onClick = {
                scope.launch {
                    lazyListState.scrollToItem(list.lastIndex)
                }
            }) {
                Text("scroll to bottom")
            }
            Button(onClick = {
                scope.launch {
                    lazyListState.scrollToItem(0)
                }
            }) {
                Text("scroll to top")
            }
        }

        LazyColumn(...) { ... }
}

By commenting out ReorderableItem(reorderableLazyColumnState, item.id), the flashing disappears.

commented out ReorderableItem flash with ReorderableItem

dsrees avatar Mar 10 '25 19:03 dsrees

Same issue. Temporarily "solved" by rolling back to version 2.3.3.

impalex avatar Apr 02 '25 09:04 impalex

The problem disappeared after the BOM upgrade to 2025.04.01 (from 2025.04.00).

impalex avatar Apr 24 '25 01:04 impalex

@impalex what BOM did you upgrade?

dsrees avatar May 02 '25 15:05 dsrees

@dsrees https://mvnrepository.com/artifact/androidx.compose/compose-bom Upgrading from 2025.04.00 to 2025.04.01 fixed the problem (for me, at least).

impalex avatar May 02 '25 15:05 impalex

seems solved?

Calvin-LL avatar Jun 06 '25 21:06 Calvin-LL