Skip to content

Commit 8ae6a4d

Browse files
authored
V7_KeyboardAccessoryView - remove 'iOSScrollBehavior' prop (#2469)
* KeyboardAccessoryView - remove 'iOSScrollBehavior' prop and 'iosScrollBehaviors' enum * fix pr comments
1 parent 435c27a commit 8ae6a4d

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/components/Keyboard/KeyboardInput/KeyboardAccessoryView.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
BackHandler,
1010
LayoutChangeEvent
1111
} from 'react-native';
12-
import {LogService} from '../../../../src/services';
1312
import KeyboardTrackingView, {KeyboardTrackingViewProps} from '../KeyboardTracking/KeyboardTrackingView';
1413
import CustomKeyboardView from './CustomKeyboardView';
1514
import KeyboardUtils from './utils/KeyboardUtils';
@@ -54,12 +53,6 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
5453
* Callback that will be called once the keyboard has been closed
5554
*/
5655
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;
6356
children?: React.ReactChild;
6457
};
6558

@@ -69,10 +62,6 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
6962
* @gif: https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/KeyboardAccessoryView/KeyboardAccessoryView.gif?raw=true
7063
*/
7164
class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
72-
/**
73-
* @deprecated Please use KeyboardAccessoryView.scrollBehaviors instead
74-
*/
75-
static iosScrollBehaviors = KeyboardTrackingView.scrollBehaviors; //TODO: remove on V7
7665
static scrollBehaviors = KeyboardTrackingView.scrollBehaviors;
7766

7867
static defaultProps = {
@@ -99,12 +88,6 @@ class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
9988

10089
this.registerForKeyboardResignedEvent();
10190
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-
}
10891
}
10992

11093
componentWillUnmount() {
@@ -193,14 +176,13 @@ class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
193176
onItemSelected,
194177
onRequestShowKeyboard,
195178
scrollBehavior,
196-
iOSScrollBehavior,
197179
...others
198180
} = this.props;
199181

200182
return (
201183
<KeyboardTrackingView
202184
{...others}
203-
scrollBehavior={IsIOS ? iOSScrollBehavior || scrollBehavior : undefined}
185+
scrollBehavior={scrollBehavior}
204186
ref={(r: any) => (this.trackingViewRef = r)}
205187
style={styles.trackingToolbarContainer}
206188
onLayout={this.onContainerComponentHeightChanged}

0 commit comments

Comments
 (0)