douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
971 stars 59 forks source link

null is not an object (evaluating '_reactNativeKeyboardManager2.default.setKeyboardDistanceFromTextField') #46

Closed shettayyy closed 5 years ago

shettayyy commented 5 years ago

I have followed the installations steps correctly

"react-native-keyboard-manager": "^4.0.13-12",
"react-native": "^0.59.4",
Screenshot 2019-04-18 at 9 24 01 PM
spacewaffle commented 5 years ago

This package is not necessary for android and causes problems. Run it only on ios like so:


if (Platform.OS === 'ios' ){
  KeyboardManager.setEnableAutoToolbar(false);
  KeyboardManager.setKeyboardDistanceFromTextField(5);
}```
shettayyy commented 5 years ago

I actually had to link it manually to make it work.

WoodyWoodsta commented 5 years ago

It appears as though this project isn't linking correctly

shettayyy commented 5 years ago

This package is not necessary for android and causes problems. Run it only on ios like so:

if (Platform.OS === 'ios' ){
  KeyboardManager.setEnableAutoToolbar(false);
  KeyboardManager.setKeyboardDistanceFromTextField(5);
}```

As you can see I am running it on Android and I did add the condition. I request someone to take a look.

ldco2016 commented 5 years ago

Has this been resolved?

I am getting a similar error on android only. I am running RN 60.4 and so I did not manually link the library. Do I need to manually link the library?

I have it imported in my index.js file like so:

import KeyboardManager from "react-native-keyboard-manager";

and calling it like so:

KeyboardManager.setToolbarPreviousNextButtonEnable(true); in said file. Is this not correct?