Skip to content

Commit

Permalink
Replace deprecated currentlyFocusedField with currentlyFocusedInput
Browse files Browse the repository at this point in the history
This fixes the console error:
currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput
  • Loading branch information
ceyhun committed Sep 23, 2020
1 parent 47bd771 commit ace6218
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,8 @@ class AztecView extends React.Component {
}

isFocused() {
const focusedField = TextInputState.currentlyFocusedField();
return (
focusedField && focusedField === ReactNative.findNodeHandle( this )
);
const focusedInput = TextInputState.currentlyFocusedInput();
return focusedInput && focusedInput === this.nativeComponentRef.current;
}

_onPress( event ) {
Expand Down

0 comments on commit ace6218

Please sign in to comment.