react-native-keyboard-aware-scroll-view
react-native-keyboard-aware-scroll-view copied to clipboard
KeyboardAwareMixin won't register keyboard events callback
I see from the docs that one should be able to register callbacks passing onKeyboardWillShow, for example. But that doesn't seem to be actually happening. Am I missing something?
I expected a code like:
componentDidMount: function () {
// current code here
// Similar (maybe cleverer) code for each supported event
if (this.props.onKeyboardWillShow) {
this.keyboardShowCallbackEvent = Keyboard.addListener('keyboardWillShow', this.props.onKeyboardWillShow);
}
},
componentWillUnmount: function () {
// current code here
// Similar (maybe cleverer) code for each supported event
this.keyboardShowCallbackEvent && this.keyboardShowCallbackEvent.remove();
},
On KeyboardAwareMixin
You are right, onKeyboardWillShow prop isn't handled yet.
@alvaromb I see that you are rewriting the component, could you handle it in the new implementation?
Hi @leonardocarvalho!
Can you send us a PR? :)
So are the docs incorrect; onKeyboardWillShow is ignored?
I am having the same issue.
v0.2.9