Skip to content

Commit

Permalink
Add wrapContent to HorizontalScroll builder
Browse files Browse the repository at this point in the history
Summary: Add wrapContent to HorizontalScroll builder

Reviewed By: adityasharat

Differential Revision: D55138100

fbshipit-source-id: 8503102e7852694e93cb63bf2c774f8c46db49c4
  • Loading branch information
jettbow authored and facebook-github-bot committed Mar 20, 2024
1 parent e97ae62 commit c2cc775
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.facebook.rendercore.Dimen
inline fun ResourcesScope.HorizontalScroll(
initialScrollPosition: Dimen? = null,
scrollbarEnabled: Boolean = true,
wrapContent: Boolean = false,
fillViewport: Boolean = false,
eventsController: HorizontalScrollEventsController? = null,
noinline onScrollChange: ((View, scrollX: Int, oldScrollX: Int) -> Unit)? = null,
Expand All @@ -39,6 +40,7 @@ inline fun ResourcesScope.HorizontalScroll(
.contentProps(child())
.apply { initialScrollPosition?.let { initialScrollPosition(it.toPixels()) } }
.scrollbarEnabled(scrollbarEnabled)
.wrapContent(wrapContent)
.fillViewport(fillViewport)
.eventsController(eventsController)
.onScrollChangeListener(onScrollChange)
Expand Down

0 comments on commit c2cc775

Please sign in to comment.