9
9
BackHandler ,
10
10
LayoutChangeEvent
11
11
} from 'react-native' ;
12
- import { LogService } from '../../../../src/services' ;
13
12
import KeyboardTrackingView , { KeyboardTrackingViewProps } from '../KeyboardTracking/KeyboardTrackingView' ;
14
13
import CustomKeyboardView from './CustomKeyboardView' ;
15
14
import KeyboardUtils from './utils/KeyboardUtils' ;
@@ -54,12 +53,6 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
54
53
* Callback that will be called once the keyboard has been closed
55
54
*/
56
55
onKeyboardResigned ?: ( ) => void ;
57
- /**
58
- * @deprecated
59
- * Please use 'scrollBehavior' prop instead
60
- * The scrolling behavior (use KeyboardAccessoryView.scrollBehaviors.NONE | SCROLL_TO_BOTTOM_INVERTED_ONLY | FIXED_OFFSET)
61
- */
62
- iOSScrollBehavior ?: number ;
63
56
children ?: React . ReactChild ;
64
57
} ;
65
58
@@ -69,10 +62,6 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
69
62
* @gif : https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/KeyboardAccessoryView/KeyboardAccessoryView.gif?raw=true
70
63
*/
71
64
class KeyboardAccessoryView extends Component < KeyboardAccessoryViewProps > {
72
- /**
73
- * @deprecated Please use KeyboardAccessoryView.scrollBehaviors instead
74
- */
75
- static iosScrollBehaviors = KeyboardTrackingView . scrollBehaviors ; //TODO: remove on V7
76
65
static scrollBehaviors = KeyboardTrackingView . scrollBehaviors ;
77
66
78
67
static defaultProps = {
@@ -99,12 +88,6 @@ class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
99
88
100
89
this . registerForKeyboardResignedEvent ( ) ;
101
90
this . registerAndroidBackHandler ( ) ;
102
-
103
- if ( props . iOSScrollBehavior ) {
104
- LogService . warn ( `The 'Keyboard.KeyboardAccessoryView' component's prop 'iOSScrollBehavior' is deprecated.
105
- Please use 'scrollBehavior' prop instead and pass it 'Keyboard.KeyboardAccessoryView.scrollBehaviors'
106
- ('Keyboard.KeyboardAccessoryView.iosScrollBehaviors' enum is deprecated).` ) ;
107
- }
108
91
}
109
92
110
93
componentWillUnmount ( ) {
@@ -193,14 +176,13 @@ class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
193
176
onItemSelected,
194
177
onRequestShowKeyboard,
195
178
scrollBehavior,
196
- iOSScrollBehavior,
197
179
...others
198
180
} = this . props ;
199
181
200
182
return (
201
183
< KeyboardTrackingView
202
184
{ ...others }
203
- scrollBehavior = { IsIOS ? iOSScrollBehavior || scrollBehavior : undefined }
185
+ scrollBehavior = { scrollBehavior }
204
186
ref = { ( r : any ) => ( this . trackingViewRef = r ) }
205
187
style = { styles . trackingToolbarContainer }
206
188
onLayout = { this . onContainerComponentHeightChanged }
0 commit comments