react-native/Examples/UIExplorer/js
Martin Konicek 9dee696ed8 Add scrollToEnd to ScrollView and ListView
Summary:
**Motivation**

A basic task of making a React Native ScrollView or ListView scroll to the bottom is currently very hard to accomplish:
- https://github.com/facebook/react-native/issues/8003
- https://github.com/facebook/react-native/issues/913
- http://stackoverflow.com/questions/29829375/how-to-scroll-to-bottom-in-react-native-listview

**NOTE:** If you're building something like a chat app where you want a ListView to keep scrolling to the bottom at all times, it's easiest to use the [react-native-invertible-scrollview](https://github.com/exponent/react-native-invertible-scroll-view) component rather calling `scrollToEnd` manually when layout changes. The invertible-scrollview uses a clever trick to invert the direction of the ScrollView.

This pull request adds a `scrollToEnd` method which scrolls to the bottom if the ScrollView is vertical, to the right if the ScrollView is horizontal.

The implementation is based on this SO answer:
http://stackoverflow.com/questions/952412/uiscrollview-scrol
Closes https://github.com/facebook/react-native/pull/12088

Differential Revision: D4474974

Pulled By: mkonicek

fbshipit-source-id: 6ecf8b3435f47dd3a31e2fd5be6859062711c233
2017-01-27 10:13:29 -08:00
..
AnimatedGratuitousApp Remove listener 2017-01-19 22:28:27 -08:00
NavigationExperimental Reverted commit D4027388 2016-10-16 04:13:42 -07:00
Navigator Kill require('image!...') 2016-11-22 21:13:52 -08:00
Thumbnails
AccessibilityAndroidExample.android.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
AccessibilityIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
ActionSheetIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
ActivityIndicatorExample.js ActivityIndicator Example ES6 classes migration and TimerMixin removal 2016-08-02 17:13:30 -07:00
AdSupportIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
AlertExample.js Android: Implement cancelable option for Alerts 2016-08-09 06:13:48 -07:00
AlertIOSExample.js Add one more parameter(keyboardType) to AlertIOS.promot(). 2017-01-19 14:43:37 -08:00
AnimatedExample.js
AppStateExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
AssetScaledImageExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
AsyncStorageExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
BorderExample.js
BoxShadowExample.js
ButtonExample.js Add disabled prop 2016-10-14 19:43:40 -07:00
CameraRollExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
CameraRollView.js Throw flow error when trying to access a style that is not defined on a stylesheet 2016-07-18 23:28:25 -07:00
ClipboardExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
DatePickerAndroidExample.js Update DatePickerAndroidExample.js 2017-01-02 11:28:25 -08:00
DatePickerIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
ExampleTypes.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
GeolocationExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
ImageCapInsetsExample.js Kill require('image!...') 2016-11-22 21:13:52 -08:00
ImageEditingExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
ImageExample.js Cache policy control for image source 2017-01-17 17:13:31 -08:00
KeyboardAvoidingViewExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
LayoutAnimationExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
LayoutEventsExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
LayoutExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
LinkingExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
ListViewExample.js Fix minor typo in ListViewExample.js 2016-07-18 10:30:53 -07:00
ListViewGridLayoutExample.js
ListViewPagingExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
MapViewExample.js Add in UI Explorer example for showing annotation callouts by default in <MapView> 2016-12-01 08:58:34 -08:00
ModalExample.js Fix ModalExample flex issue with Button 2016-10-28 05:43:35 -07:00
NativeAnimationsExample.js Drive any numerical prop via NativeAnimated 2017-01-26 18:28:53 -08:00
NavigatorIOSColorsExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
NavigatorIOSExample.js Kill require('image!...') 2016-11-22 21:13:52 -08:00
NetInfoExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
OrientationChangeExample.js Listen to device orientation changes 2016-09-06 03:59:01 -07:00
PanResponderExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
PermissionsExampleAndroid.android.js Handle "Never Ask Again" in permissions and add requestMultiplePermissions 2016-11-24 22:43:28 -08:00
PickerExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
PickerIOSExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
PointerEventsExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
ProgressBarAndroidExample.android.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
ProgressViewIOSExample.js
PushNotificationIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
RCTRootViewIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
RTLExample.js Add viewConfig to RCTSlider Component, fix #10158 2016-10-12 08:59:05 -07:00
RefreshControlExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
RootViewSizeFlexibilityExampleApp.js
ScrollViewExample.js Add scrollToEnd to ScrollView and ListView 2017-01-27 10:13:29 -08:00
ScrollViewSimpleExample.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
SegmentedControlIOSExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
SetPropertiesExampleApp.js
ShareExample.js Add Share module 2016-07-25 03:43:29 -07:00
SliderExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
SnapshotExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
StatusBarExample.js Revert D4450924: Expose StatusBar height on iOS 2017-01-25 17:59:30 -08:00
SwipeableListViewExample.js Remove react-native.js.flow 2016-09-14 02:58:40 -07:00
SwitchExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
TabBarIOSExample.js unselectedItemTintColor property available since iOS10 2016-11-29 12:28:55 -08:00
TextExample.android.js Add selectionColor prop for Text on Android 2017-01-18 12:58:44 -08:00
TextExample.ios.js Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
TextInputExample.android.js Cleanup: Prefer `React.Element` over `React$?Element` 2016-10-14 08:59:37 -07:00
TextInputExample.ios.js RN TextInput: don't let user more than maxLength when TextInput already exceeds it 2016-10-18 08:13:41 -07:00
TimePickerAndroidExample.js FIX #9939 - Add missing options argument to Android picker example 2016-09-16 00:43:30 -07:00
TimerExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
ToastAndroidExample.android.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
ToolbarAndroidExample.android.js Kill require('image!...') 2016-11-22 21:13:52 -08:00
TouchableExample.js Fix for TouchableNativeFeedback having Animated.Component direct child 2016-10-25 00:28:37 -07:00
TransformExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
TransparentHitTestExample.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
UIExplorerActions.js
UIExplorerApp.android.js Kill require('image!...') 2016-11-22 21:13:52 -08:00
UIExplorerApp.ios.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
UIExplorerBlock.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
UIExplorerButton.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
UIExplorerExampleContainer.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
UIExplorerExampleList.js Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
UIExplorerList.android.js Introduce Button Component 2016-10-10 17:28:39 -07:00
UIExplorerList.ios.js Consolidate XHR UIExplorer examples 2017-01-14 18:58:26 -08:00
UIExplorerNavigationReducer.js
UIExplorerPage.js Reworking keyboardShouldPersistTaps to have a middle ground 2016-12-07 21:43:35 -08:00
UIExplorerSettingSwitchRow.js Add some stall stuff as settings to native animated example 2016-09-06 19:58:35 -07:00
UIExplorerStatePersister.js Deploy v0.35.0 2016-11-14 20:45:17 -08:00
UIExplorerStateTitleMap.js
UIExplorerTitle.js Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
URIActionMap.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
VibrationExample.js Ios: complete iOS vibration pattern supports (js) 2016-08-25 18:28:38 -07:00
VibrationIOSExample.js
ViewExample.js Reinstate view example for screenshot tests 2016-08-16 04:58:30 -07:00
ViewPagerAndroidExample.android.js Modify image url from http to https on examples 2016-11-03 08:13:37 -07:00
WebSocketExample.js Android WebSocket: include cookies in request 2016-11-07 10:43:44 -08:00
WebViewExample.js Fix typo for messaging test in webview example 2017-01-20 13:58:27 -08:00
XHRExample.js XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
XHRExampleBinaryUpload.js XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
XHRExampleCookies.js
XHRExampleDownload.js Consolidate XHR UIExplorer examples 2017-01-14 18:58:26 -08:00
XHRExampleFetch.js Update XHRExampleFetch and dump the response headers 2016-09-06 04:28:38 -07:00
XHRExampleFormData.js XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
XHRExampleHeaders.js
XHRExampleOnTimeOut.js
bunny.png
createExamplePage.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
flux@3x.png
hawk.png
helloworld.html
http_test_server.js Android WebSocket: include cookies in request 2016-11-07 10:43:44 -08:00
messagingtest.html Implement a postMessage function and an onMessage event for webviews … 2016-10-16 06:43:46 -07:00
relay@3x.png
slider-left.png
slider-left@2x.png
slider-right.png
slider-right@2x.png
slider.png
slider@2x.png
uie_comment_highlighted@2x.png
uie_comment_normal@2x.png
uie_thumb_big.png
uie_thumb_normal@2x.png
uie_thumb_selected@2x.png
websocket_test_server.js Android WebSocket: include cookies in request 2016-11-07 10:43:44 -08:00