mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Implement ScrollView.indicatorStyle
Summary: Changelog: [internal] Differential Revision: D25996218 fbshipit-source-id: 38b521b0ac52635a2c6341450592e6dd27be00f4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa728b27e6
commit
768ecc2906
@@ -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 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
|
||||
// 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 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
|
||||
_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.
|
||||
|
||||
Reference in New Issue
Block a user