I have a simple LazyColumn in a ModalBottomSheet. The issue is that when the LazyColumn scrolling comes to a stop the ModalBottomsSheet briefly takes scroll control for a second before LazyColumn regains control. The bottom sheet should only be draggable on the handle or when scrolling reaches the top.
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SheetTest() {
ModalBottomSheet(
sheetState = rememberModalBottomSheetState(
skipPartiallyExpanded = true,
confirmValueChange = { it != SheetValue.Hidden } // Disabled dismiss for testing
),
onDismissRequest = {},
containerColor = Color.Blue
) {
LazyColumn(modifier = Modifier.fillMaxSize()) {
items(
items = dummyPlaces // Random strings
) { text ->
Text(
text = text,
fontSize = 48.sp,
color = Color.Green
)
}
}
}
}
I’m still a newbie at Compose but was wondering if there’s way to fix this using NestedScrollConnection? I’ve tried nestedScroll(rememberNestedScrollInteropConnection())
but that wasn’t useful.
I’m just surprised that nobody’s asked about this considering how common this Composable setup is, or I just suck at finding answers. But any help would be appreciated! Here’s a video demo.