Skip to content

Commit a54cfb9

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Add snapToAlignment to ScrollView.js Android implementation
Summary: Update ScrollView.js to support snapToAlignment in RN Android changelog: [Android][Added] Implement snapToAlignment in ReactHorizontalScrollView Reviewed By: JoshuaGross Differential Revision: D31174546 fbshipit-source-id: 480e990793ced74121c6aa1875f2695a70d1f804
1 parent b29b05f commit a54cfb9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

Libraries/Components/ScrollView/ScrollView.js

+9-11
Original file line numberDiff line numberDiff line change
@@ -346,17 +346,6 @@ type IOSProps = $ReadOnly<{|
346346
* The default value is true.
347347
*/
348348
showsHorizontalScrollIndicator?: ?boolean,
349-
/**
350-
* When `snapToInterval` is set, `snapToAlignment` will define the relationship
351-
* of the snapping to the scroll view.
352-
*
353-
* - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
354-
* - `'center'` will align the snap in the center
355-
* - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
356-
*
357-
* @platform ios
358-
*/
359-
snapToAlignment?: ?('start' | 'center' | 'end'),
360349
/**
361350
* The current scale of the scroll view content. The default value is 1.0.
362351
* @platform ios
@@ -597,6 +586,15 @@ export type Props = $ReadOnly<{|
597586
* for example when you want your list to have an animated hidable header.
598587
*/
599588
StickyHeaderComponent?: StickyHeaderComponentType,
589+
/**
590+
* When `snapToInterval` is set, `snapToAlignment` will define the relationship
591+
* of the snapping to the scroll view.
592+
*
593+
* - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
594+
* - `'center'` will align the snap in the center
595+
* - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
596+
*/
597+
snapToAlignment?: ?('start' | 'center' | 'end'),
600598
/**
601599
* When set, causes the scroll view to stop at multiples of the value of
602600
* `snapToInterval`. This can be used for paginating through children

0 commit comments

Comments
 (0)