From 64899c08f382ce64fd694a890ccc0f5ff7b8d75c Mon Sep 17 00:00:00 2001 From: Taylor Kline Date: Mon, 24 Jul 2017 11:13:14 -0700 Subject: [PATCH] Identify keyboardDismissMode platform-specific options Summary: Similar to `TextInput`'s `returnKeyType`, comments allow to see at a glance which options are cross-platform and which are not. Closes https://github.com/facebook/react-native/pull/14780 Differential Revision: D5480895 Pulled By: hramos fbshipit-source-id: c38337def920678d29c8322e52b54f57e80cb95b --- Libraries/Components/ScrollView/ScrollView.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index e4e677f00..66cce10ce 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -201,16 +201,21 @@ const ScrollView = createReactClass({ /** * Determines whether the keyboard gets dismissed in response to a drag. * + * *Cross platform* + * * - `'none'` (the default), drags do not dismiss the keyboard. * - `'on-drag'`, the keyboard is dismissed when a drag begins. + * + * *iOS Only* + * * - `'interactive'`, the keyboard is dismissed interactively with the drag and moves in * synchrony with the touch; dragging upwards cancels the dismissal. * On android this is not supported and it will have the same behavior as 'none'. */ keyboardDismissMode: PropTypes.oneOf([ 'none', // default - 'interactive', - 'on-drag', + 'on-drag', // Cross-platform + 'interactive', // iOS-only ]), /** * Determines when the keyboard should stay visible after a tap.