You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use done-bar on a project stuck with [email protected] but I got the error _reactNative.Keyboard.dismiss is not a function, because Keyboard.dismiss is not defined on old versions of RN.
This can be easily solved app-side by this polyfill
import { Keyboard } from 'react-native';
import TextInputState from 'TextInputState';
if (!Keyboard.dismiss) {
Keyboard.dismiss = () => TextInputState.blurTextInput(TextInputState.currentlyFocusedField());
}
Just to let you know in case you want to support previous versions.
The text was updated successfully, but these errors were encountered:
I tried to update to 1.0.1 and now I got that error:
Unable to resolve module TextInputState from /Users/<project_dir>/node_modules/done-bar/src/DoneBar.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/TextInputState and its parent directories
I think import TextInputState from 'TextInputState' will only be resolved when the project uses the same version of RN as the lib. However this should work all the time:
import TextInputState from 'react-native/lib/TextInputState';
Hi,
I tried to use done-bar on a project stuck with [email protected] but I got the error
_reactNative.Keyboard.dismiss is not a function
, becauseKeyboard.dismiss
is not defined on old versions of RN.This can be easily solved app-side by this polyfill
Just to let you know in case you want to support previous versions.
The text was updated successfully, but these errors were encountered: