Skip to content

Commit e27ef15

Browse files
committed
Drop boolean support for ScrollView keyboardShouldPersistTaps
# Conflicts: # packages/react-native/Libraries/Components/ScrollView/ScrollView.js
1 parent 701de4e commit e27ef15

4 files changed

Lines changed: 17 additions & 38 deletions

File tree

packages/react-native/Libraries/Components/ScrollView/ScrollView.d.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -671,15 +671,8 @@ export interface ScrollViewProps
671671
* - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
672672
* - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
673673
* - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
674-
* - false, deprecated, use 'never' instead
675-
* - true, deprecated, use 'always' instead
676674
*/
677-
keyboardShouldPersistTaps?:
678-
| boolean
679-
| 'always'
680-
| 'never'
681-
| 'handled'
682-
| undefined;
675+
keyboardShouldPersistTaps?: 'always' | 'never' | 'handled' | undefined;
683676

684677
/**
685678
* Called when scrollable content view of the ScrollView changes.

packages/react-native/Libraries/Components/ScrollView/ScrollView.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,10 @@ type ScrollViewBaseProps = Readonly<{
581581
* catch taps, but children of the scroll view can catch taps.
582582
* - `'handled'`, the keyboard will not dismiss automatically when the tap was handled by
583583
* children, (or captured by an ancestor).
584-
* - `false`, deprecated, use `'never'` instead.
585-
* - `true`, deprecated, use `'always'` instead.
586584
*
587585
* @default `'never'`
588586
*/
589-
keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | true | false),
587+
keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled'),
590588
/**
591589
* When set, the scroll view will adjust the scroll position so that the first child that is
592590
* partially or fully visible and at or beyond `minIndexForVisible` will not change position.

packages/react-native/Libraries/Lists/FlatList.d.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
2929
* - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
3030
* - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
3131
* - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
32-
* - false, deprecated, use 'never' instead
33-
* - true, deprecated, use 'always' instead
34-
*/
35-
keyboardShouldPersistTaps?:
36-
| boolean
37-
| 'always'
38-
| 'never'
39-
| 'handled'
40-
| undefined;
32+
*/
33+
keyboardShouldPersistTaps?: 'always' | 'never' | 'handled' | undefined;
4134

4235
/**
4336
* An array (or array-like list) of items to render. Other data types can be

packages/react-native/ReactNativeApi.d.ts

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<42200de8ca10d30541e23b67547d9a13>>
7+
* @generated SignedSource<<ecd51d2fc424f037257439055d8dd1ab>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -4363,12 +4363,7 @@ declare type ScrollViewBaseProps = {
43634363
readonly innerViewRef?: React.Ref<InnerViewInstance>
43644364
readonly invertStickyHeaders?: boolean
43654365
readonly keyboardDismissMode?: "interactive" | "none" | "on-drag"
4366-
readonly keyboardShouldPersistTaps?:
4367-
| "always"
4368-
| "handled"
4369-
| "never"
4370-
| false
4371-
| true
4366+
readonly keyboardShouldPersistTaps?: "always" | "handled" | "never"
43724367
readonly maintainVisibleContentPosition?: {
43734368
readonly autoscrollToTopThreshold?: number
43744369
readonly minIndexForVisible: number
@@ -5920,7 +5915,7 @@ export {
59205915
AlertOptions, // a0cdac0f
59215916
AlertType, // 5ab91217
59225917
AndroidKeyboardEvent, // e03becc8
5923-
Animated, // 1ac00401
5918+
Animated, // 5942de6b
59245919
AppConfig, // 35c0ca70
59255920
AppRegistry, // 7ef8e53a
59265921
AppState, // 12012be5
@@ -5970,9 +5965,9 @@ export {
59705965
EventSubscription, // b8d084aa
59715966
ExtendedExceptionData, // 5a6ccf5a
59725967
FilterFunction, // bf24c0e3
5973-
FlatList, // b5cfde24
5974-
FlatListInstance, // 8f76f3b2
5975-
FlatListProps, // 3725656d
5968+
FlatList, // 0f2531c9
5969+
FlatListInstance, // f31d4744
5970+
FlatListProps, // b8b5adf2
59765971
FocusEvent, // 850f1517
59775972
FontVariant, // 7c7558bb
59785973
GestureResponderEvent, // 14d3e77a
@@ -6112,18 +6107,18 @@ export {
61126107
ScrollEvent, // d7abdd0a
61136108
ScrollResponderType, // 079145bb
61146109
ScrollToLocationParamsType, // d7ecdad1
6115-
ScrollView, // 9c14c51c
6110+
ScrollView, // d7defbe2
61166111
ScrollViewImperativeMethods, // d3ff1532
61176112
ScrollViewInstance, // 1ba64600
6118-
ScrollViewProps, // c92ac7be
6113+
ScrollViewProps, // 9207390b
61196114
ScrollViewPropsAndroid, // 44210553
61206115
ScrollViewPropsIOS, // da991b9a
61216116
ScrollViewScrollToOptions, // 3313411e
61226117
SectionBase, // dca83594
6123-
SectionList, // 626263b4
6118+
SectionList, // f483c886
61246119
SectionListData, // e0d79987
6125-
SectionListInstance, // 019cdaef
6126-
SectionListProps, // 4cb9dfa9
6120+
SectionListInstance, // 1b255509
6121+
SectionListProps, // e06b9868
61276122
SectionListRenderItem, // 466e3e87
61286123
SectionListRenderItemInfo, // d809238e
61296124
Separators, // 6a45f7e3
@@ -6197,10 +6192,10 @@ export {
61976192
VirtualViewMode, // 6be59722
61986193
VirtualizedList, // 68c7345e
61996194
VirtualizedListInstance, // 423ee7c0
6200-
VirtualizedListProps, // 29367911
6195+
VirtualizedListProps, // cc8bc4c9
62016196
VirtualizedSectionList, // 9fd9cd61
62026197
VirtualizedSectionListInstance, // 12b706d5
6203-
VirtualizedSectionListProps, // 6b9d9c05
6198+
VirtualizedSectionListProps, // 12a58a4f
62046199
WrapperComponentProvider, // 4b8c7962
62056200
codegenNativeCommands, // 628a7c0a
62066201
codegenNativeComponent, // 32a1bca6

0 commit comments

Comments
 (0)