diff --git a/releases/next/docs/listview.html b/releases/next/docs/listview.html index 63ef14811de..91885b2c793 100644 --- a/releases/next/docs/listview.html +++ b/releases/next/docs/listview.html @@ -69,7 +69,10 @@ top of the scroll view. This property is not supported in conjunction with horizontal={true}.

iosstickySectionHeadersEnabled bool #

Makes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it -is pushed off the screen by the next section header.

Methods #

getMetrics(0) #

Exports some data, e.g. for perf investigations or analytics.

scrollTo(...args) #

Scrolls to a given x, y offset, either immediately or with a smooth animation.

See ScrollView#scrollTo.

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; +is pushed off the screen by the next section header.

Methods #

getMetrics(0) #

Exports some data, e.g. for perf investigations or analytics.

scrollTo(...args) #

Scrolls to a given x, y offset, either immediately or with a smooth animation.

See ScrollView#scrollTo.

scrollToEnd(options?) #

If this is a vertical ListView scrolls to the bottom. +If this is a horizontal ListView scrolls to the right.

Use scrollToEnd({animated: true}) for smooth animated scrolling, +scrollToEnd({animated: false}) for immediate scrolling. +If no options are passed, animated defaults to true.

See ScrollView#scrollToEnd.

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; var React = require('react'); var ReactNative = require('react-native'); diff --git a/releases/next/docs/scrollview.html b/releases/next/docs/scrollview.html index 5c31a358efc..7426c04659f 100644 --- a/releases/next/docs/scrollview.html +++ b/releases/next/docs/scrollview.html @@ -104,9 +104,12 @@ with snapToAlignment.

ioszoomScale number #

The current scale of the scroll view content. The default value is 1.0.

Methods #

scrollTo(y?, x?, animated?) #

Scrolls to a given x, y offset, either immediately or with a smooth animation.

Syntax:

scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})

Note: The weird argument signature is due to the fact that, for historical reasons, +with horizontal={true}.

ioszoomScale number #

The current scale of the scroll view content. The default value is 1.0.

Methods #

scrollTo(y?, x?, animated?) #

Scrolls to a given x, y offset, either immediately or with a smooth animation.

Example:

scrollTo({x: 0; y: 0; animated: true})

Note: The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as as alternative to the options object. -This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.

scrollWithoutAnimationTo(y, x) #

Deprecated, do not use.

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; +This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.

scrollToEnd(options?) #

If this is a vertical ScrollView scrolls to the bottom. +If this is a horizontal ScrollView scrolls to the right.

Use scrollToEnd({animated: true}) for smooth animated scrolling, +scrollToEnd({animated: false}) for immediate scrolling. +If no options are passed, animated defaults to true.

See ScrollView#scrollToEnd.

scrollWithoutAnimationTo(y, x) #

Deprecated, use scrollTo instead.

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; var React = require('react'); var ReactNative = require('react-native'); @@ -143,6 +146,11 @@ exports.examples ={() => { _scrollView.scrollTo({y: 0}); }}> <Text>Scroll to top</Text> </TouchableOpacity> + <TouchableOpacity + style={styles.button} + onPress={() => { _scrollView.scrollToEnd({animated: true}); }}> + <Text>Scroll to bottom</Text> + </TouchableOpacity> </View> ); } @@ -165,6 +173,11 @@ exports.examples ={() => { _scrollView.scrollTo({x: 0}); }}> <Text>Scroll to start</Text> </TouchableOpacity> + <TouchableOpacity + style={styles.button} + onPress={() => { _scrollView.scrollToEnd({animated: true}); }}> + <Text>Scroll to end</Text> + </TouchableOpacity> </View> ); }