mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add missing ScrollView props to ScrollProps (#51167)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51167 Adding the ScrollView properties that are android specific to the common ScrollView props so that they can be diffed in a getDiffProps implementation. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D74327335 fbshipit-source-id: 8e5683d4bf7fe0f6d54d4b97f535731721c60292
This commit is contained in:
committed by
Facebook GitHub Bot
parent
68baff1d67
commit
4591bb2909
+32
-2
@@ -371,7 +371,27 @@ ScrollViewProps::ScrollViewProps(
|
||||
rawProps,
|
||||
"isInvertedVirtualizedList",
|
||||
sourceProps.isInvertedVirtualizedList,
|
||||
{})) {}
|
||||
{})),
|
||||
sendMomentumEvents(
|
||||
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
||||
? sourceProps.sendMomentumEvents
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"sendMomentumEvents",
|
||||
sourceProps.sendMomentumEvents,
|
||||
true)),
|
||||
nestedScrollEnabled(
|
||||
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
||||
? sourceProps.nestedScrollEnabled
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"nestedScrollEnabled",
|
||||
sourceProps.nestedScrollEnabled,
|
||||
true))
|
||||
|
||||
{}
|
||||
|
||||
void ScrollViewProps::setProp(
|
||||
const PropsParserContext& context,
|
||||
@@ -424,6 +444,8 @@ void ScrollViewProps::setProp(
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(contentInsetAdjustmentBehavior);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollToOverflowEnabled);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(isInvertedVirtualizedList);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(sendMomentumEvents);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(nestedScrollEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +580,15 @@ SharedDebugStringConvertibleList ScrollViewProps::getDebugProps() const {
|
||||
debugStringConvertibleItem(
|
||||
"isInvertedVirtualizedList",
|
||||
snapToEnd,
|
||||
defaultScrollViewProps.isInvertedVirtualizedList)};
|
||||
defaultScrollViewProps.isInvertedVirtualizedList),
|
||||
debugStringConvertibleItem(
|
||||
"sendMomentumEvents",
|
||||
sendMomentumEvents,
|
||||
defaultScrollViewProps.sendMomentumEvents),
|
||||
debugStringConvertibleItem(
|
||||
"nestedScrollEnabled",
|
||||
nestedScrollEnabled,
|
||||
defaultScrollViewProps.nestedScrollEnabled)};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+3
@@ -74,6 +74,9 @@ class ScrollViewProps final : public ViewProps {
|
||||
bool scrollToOverflowEnabled{false};
|
||||
bool isInvertedVirtualizedList{false};
|
||||
|
||||
bool sendMomentumEvents{};
|
||||
bool nestedScrollEnabled{};
|
||||
|
||||
#pragma mark - DebugStringConvertible
|
||||
|
||||
#if RN_DEBUG_STRING_CONVERTIBLE
|
||||
|
||||
Reference in New Issue
Block a user