Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add enabled/disabled state for KeyboardAwareScrollView component (
#350) ## 📜 Description I added the enableKeyboardHandling property to be able to turn off this component on screens that are no longer in focus and save resources. Also, it can be useful if someone uses bottomSheet navigation or has text input in a transparent modal or alerts. ## 💡 Motivation and Context To give an ability for users to turn off auto scrolling (sometimes it may be needed to cover specific requirements). ## 📢 Changelog - added new `enabled` prop for `KeyboardAwareScrollView` component; ## 🤔 How Has This Been Tested? Tested on: - iPhone 15 pro - Pixel 3 a ## 📸 Screenshots (if appropriate): https://github.com/kirillzyusko/react-native-keyboard-controller/assets/86000012/584a63f0-cafc-4cf2-b207-6e4c33cbf86c ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed --------- Co-authored-by: kirillzyusko <zyusko.kirik@gmail.com>
- Loading branch information
1 parent
5913699
commit 3922158
Showing
35 changed files
with
296 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+63.2 KB
e2e/kit/assets/android/e2e_emulator/AwareScrollViewDisabledStateKeyboardClosed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.7 KB
e2e/kit/assets/android/e2e_emulator/AwareScrollViewDisabledStateKeyboardOpened.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-514 Bytes
(100%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewFirstInputFocused.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-432 Bytes
(100%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewFirstInputGrown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-485 Bytes
(99%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewInputChanged.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-463 Bytes
(99%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewKeyboardClosed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-408 Bytes
(99%)
.../assets/android/e2e_emulator/AwareScrollViewKeyboardClosedWithoutBackScroll.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-426 Bytes
(100%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewSecondInputFocused.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-364 Bytes
(100%)
e2e/kit/assets/android/e2e_emulator/AwareScrollViewTextChanged.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+141 KB
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewDisabledStateKeyboardClosed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+173 KB
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewDisabledStateKeyboardOpened.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.14 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewFirstInputFocused.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.49 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewFirstInputGrown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.44 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewInputChanged.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.65 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewKeyboardClosed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.31 KB
(100%)
...kit/assets/ios/iPhone 13 Pro/AwareScrollViewKeyboardClosedWithoutBackScroll.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.21 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewSecondInputFocused.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.56 KB
(100%)
e2e/kit/assets/ios/iPhone 13 Pro/AwareScrollViewTextChanged.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.