Closed kirillzyusko closed 5 months ago
React on enabled property toggle when keyboard open in KeyboardAwareScrollView component.
enabled
KeyboardAwareScrollView
Initially me and @IvanIhnatsiuk were thinking that in https://github.com/kirillzyusko/react-native-keyboard-controller/pull/350 it will be better to not handle keyboard appearance if enabled=false. But it turns out that it will produce issues like https://github.com/kirillzyusko/react-native-keyboard-controller/issues/414
enabled=false
So in this PR I'm always keeping a handler in useKeyboardHandler hook and instead I don't render additional padding if view is disabled (we are not making any scrolling because we already handle enabled property value in maybeScroll).
useKeyboardHandler
maybeScroll
Fixes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/414
Tested manually on iPhone 15 Pro (iOS 17.4, simulator).
π Description
React on
enabled
property toggle when keyboard open inKeyboardAwareScrollView
component.π‘ Motivation and Context
Initially me and @IvanIhnatsiuk were thinking that in https://github.com/kirillzyusko/react-native-keyboard-controller/pull/350 it will be better to not handle keyboard appearance if
enabled=false
. But it turns out that it will produce issues like https://github.com/kirillzyusko/react-native-keyboard-controller/issues/414So in this PR I'm always keeping a handler in
useKeyboardHandler
hook and instead I don't render additional padding if view is disabled (we are not making any scrolling because we already handleenabled
property value inmaybeScroll
).Fixes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/414
π’ Changelog
JS
enabled
property;π€ How Has This Been Tested?
Tested manually on iPhone 15 Pro (iOS 17.4, simulator).
πΈ Screenshots (if appropriate):
π Checklist