-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard height as animated value from useKeyboard #81
Comments
That's a good idea. For playing around, I made this with no animations https://snack.expo.io/Bk6HNSRHU and this with react-spring https://snack.expo.io/HJN9BBRS8. One thing I would suggest is to keep the |
Hello guys ! I've juste made a PR based on the proposition here: #140 |
import {useKeyboardEffect} from '@react-native-community/hooks'
useKeyboardEffect((type, event) => {
if (type === 'keyboardDidShow') {
console.log('keyboard did show')
} else if (type === 'keyboardDidHide') {
console.log('keyboard did hide')
}
}, []) This way we could work with any animated react-native or react-native-reanimated or something different |
Feature Request
I think it would be nice if
useKeyboard
could return anAnimated.value
for the keyboard height.Why it is needed
Currently, when using
keyboardHeight
to set e.g. padding it looks very janky when the keyboard is shown or hidden. Exporting an animated value that represents the height could allos the end user to animate the padding as the keyboard appears.Possible implementation
t.b.d
Code sample
t.b.d.
I need this in a project I'm working on so I will probably submit a pull request as soon as I get time☺️
The text was updated successfully, but these errors were encountered: