What's the ideal way to disable scrolling on Horiz...
# compose
w
What's the ideal way to disable scrolling on HorizontalPager when it's LazyRow children are being scrolled, regardless of whether the children has reached the end of their scroll or not? This works currently:
Copy code
private class MyPagerNestedScrollConnection(val state: PagerState) : NestedScrollConnection {

    override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
        return if (source == NestedScrollSource.UserInput && abs(state.currentPageOffsetFraction) > 1e-6) {
            available.copy(y = 0f)
        } else {
            Offset.Zero
        }
    }

    override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset {
        return available.copy(y = 0f)
    }

    override suspend fun onPostFling(consumed: Velocity, available: Velocity): Velocity {
        return available.copy(y = 0f)
    }
}
But it disables the overscroll animation effect on the LazyRows.