diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index 3cc47a007d9d89..bd9404a519c9d6 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -40,6 +40,18 @@ static UIScrollViewKeyboardDismissMode RCTUIKeyboardDismissModeFromProps(ScrollV } } +static UIScrollViewIndicatorStyle RCTUIScrollViewIndicatorStyleFromProps(ScrollViewProps const &props) +{ + switch (props.indicatorStyle) { + case ScrollViewIndicatorStyle::Default: + return UIScrollViewIndicatorStyleDefault; + case ScrollViewIndicatorStyle::Black: + return UIScrollViewIndicatorStyleBlack; + case ScrollViewIndicatorStyle::White: + return UIScrollViewIndicatorStyleWhite; + } +} + static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteger tag) { static uint16_t coalescingKey = 0; @@ -166,7 +178,6 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & // MAP_SCROLL_VIEW_PROP(automaticallyAdjustContentInsets); MAP_SCROLL_VIEW_PROP(decelerationRate); MAP_SCROLL_VIEW_PROP(directionalLockEnabled); - // MAP_SCROLL_VIEW_PROP(indicatorStyle); MAP_SCROLL_VIEW_PROP(maximumZoomScale); MAP_SCROLL_VIEW_PROP(minimumZoomScale); MAP_SCROLL_VIEW_PROP(scrollEnabled); @@ -180,6 +191,10 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & _scrollView.scrollIndicatorInsets = RCTUIEdgeInsetsFromEdgeInsets(newScrollViewProps.scrollIndicatorInsets); } + if (oldScrollViewProps.indicatorStyle != newScrollViewProps.indicatorStyle) { + _scrollView.indicatorStyle = RCTUIScrollViewIndicatorStyleFromProps(newScrollViewProps); + } + if (oldScrollViewProps.scrollEventThrottle != newScrollViewProps.scrollEventThrottle) { // Zero means "send value only once per significant logical event". // Prop value is in milliseconds.