Fix default values of snapToEnd and snapToStart in ScrollViewProps

Summary:
Changelog: [internal]

Default value for `snapToEnd` and `snapToStart` was incorrect in Fabric. This makes no practical difference as default value is never used (JavaScript always sets true or false).

Default value of `snapToEnd` is true.
https://reactnative.dev/docs/scrollview#snaptoend

Default value of `snapToStart` is true.
https://reactnative.dev/docs/scrollview#snaptostart

Reviewed By: PeteTheHeat

Differential Revision: D27505377

fbshipit-source-id: 73e88aa6ad13a851b8c401e9716fc9a650ec0098
This commit is contained in:
Samuel Susla
2021-04-01 12:06:35 -07:00
committed by Facebook GitHub Bot
parent e42ffdd859
commit 0901830977
@@ -156,10 +156,13 @@ ScrollViewProps::ScrollViewProps(
"snapToOffsets",
sourceProps.snapToOffsets,
{})),
snapToStart(
convertRawProp(rawProps, "snapToStart", sourceProps.snapToStart, {})),
snapToStart(convertRawProp(
rawProps,
"snapToStart",
sourceProps.snapToStart,
true)),
snapToEnd(
convertRawProp(rawProps, "snapToEnd", sourceProps.snapToEnd, {})),
convertRawProp(rawProps, "snapToEnd", sourceProps.snapToEnd, true)),
contentInsetAdjustmentBehavior(convertRawProp(
rawProps,
"contentInsetAdjustmentBehavior",