Skip to content

Commit

Permalink
Add im option to the params in vertical scroll wrapper
Browse files Browse the repository at this point in the history
Summary:
it is possible to set it directly on the scrolls, wrapper was missing this option.
Got oncall task that mentioned different behaviours between ig4a and fb4a where we were using spec vs primitive so adding it to fully support everything we did.

Reviewed By: pentiumao

Differential Revision: D69847560

fbshipit-source-id: cd40bd86bc434d9d024effaea5e56db98569df17
  • Loading branch information
Anna Powolny authored and facebook-github-bot committed Feb 19, 2025
1 parent 11acd58 commit fe14d92
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ inline fun ResourcesScope.VerticalScroll(
overScrollMode: Int = View.OVER_SCROLL_IF_CONTENT_SCROLLS,
eventsController: VerticalScrollEventsController? = null,
shouldCompareCommonProps: Boolean = false,
incrementalMountEnabled: Boolean = true,
noinline onScrollChange: ((NestedScrollView, scrollY: Int, oldScrollY: Int) -> Unit)? = null,
noinline onScrollStateChange: ((View, Int) -> Unit)? = null,
noinline onInterceptTouch: ((NestedScrollView, event: MotionEvent) -> Boolean)? = null,
Expand All @@ -66,6 +67,7 @@ inline fun ResourcesScope.VerticalScroll(
onScrollChange = onScrollChange,
onInterceptTouch = onInterceptTouch,
onScrollStateChange = onScrollStateChange,
incrementalMountEnabled = incrementalMountEnabled,
child = child(),
style = style,
)
Expand All @@ -83,6 +85,7 @@ inline fun ResourcesScope.VerticalScroll(
.fillViewport(fillViewport)
.eventsController(eventsController)
.shouldCompareCommonProps(shouldCompareCommonProps)
.incrementalMountEnabled(incrementalMountEnabled)
.apply {
onScrollChange?.let {
onScrollChangeListener { v, _, scrollY, _, oldScrollY -> it(v, scrollY, oldScrollY) }
Expand Down

0 comments on commit fe14d92

Please sign in to comment.