Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ScrollView's persistentScrollIndicator and horizontal to the C++ side props #43655

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
overScrollMode: true,
pagingEnabled: true,
persistentScrollbar: true,
horizontal: true,
scrollEnabled: true,
scrollPerfTag: true,
sendMomentumEvents: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
process: require('../../StyleSheet/processColor').default,
},
persistentScrollbar: true,
horizontal: true,
endFillColor: {
process: require('../../StyleSheet/processColor').default,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,23 @@ ScrollViewProps::ScrollViewProps(
"showsVerticalScrollIndicator",
sourceProps.showsVerticalScrollIndicator,
true)),
persistentScrollbar(
CoreFeatures::enablePropIteratorSetter
? sourceProps.persistentScrollbar
: convertRawProp(
context,
rawProps,
"persistentScrollbar",
sourceProps.persistentScrollbar,
true)),
horizontal(
CoreFeatures::enablePropIteratorSetter ? sourceProps.horizontal
: convertRawProp(
context,
rawProps,
"horizontal",
sourceProps.horizontal,
true)),
scrollEventThrottle(
CoreFeatures::enablePropIteratorSetter
? sourceProps.scrollEventThrottle
Expand Down Expand Up @@ -383,7 +400,8 @@ void ScrollViewProps::setProp(
RAW_SET_PROP_SWITCH_CASE_BASIC(pinchGestureEnabled);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollsToTop);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsHorizontalScrollIndicator);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsVerticalScrollIndicator);
RAW_SET_PROP_SWITCH_CASE_BASIC(persistentScrollbar);
RAW_SET_PROP_SWITCH_CASE_BASIC(horizontal);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollEventThrottle);
RAW_SET_PROP_SWITCH_CASE_BASIC(zoomScale);
RAW_SET_PROP_SWITCH_CASE_BASIC(contentInset);
Expand Down Expand Up @@ -489,6 +507,12 @@ SharedDebugStringConvertibleList ScrollViewProps::getDebugProps() const {
"showsVerticalScrollIndicator",
showsVerticalScrollIndicator,
defaultScrollViewProps.showsVerticalScrollIndicator),
debugStringConvertibleItem(
"persistentScrollbar",
persistentScrollbar,
defaultScrollViewProps.persistentScrollbar),
debugStringConvertibleItem(
"horizontal", horizontal, defaultScrollViewProps.horizontal),
debugStringConvertibleItem(
"scrollEventThrottle",
scrollEventThrottle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class ScrollViewProps final : public ViewProps {
bool scrollsToTop{true};
bool showsHorizontalScrollIndicator{true};
bool showsVerticalScrollIndicator{true};
bool persistentScrollbar{false};
bool horizontal{false};
Float scrollEventThrottle{};
Float zoomScale{1.0f};
EdgeInsets contentInset{};
Expand Down
Loading