Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
parentScrollViewTarget
detection (#347)
## 馃摐 Description Added `parentScrollViewTarget` filed to `useReanimatedFocusedInput`. ## 馃挕 Motivation and Context The motivation behind this field is described in #336 Here I'd like to focus on implementation details. The implementation is quite straighforward - we add new field to types/specs/events and we're ready to go. And this is true, but I'd like to give some implementation details: - all search of ScrollView parent I moved to extension (added new property `parentScrollViewTarget` on iOS/Android to focused input); - on iOS I need to check whether new arch is enabled (the same as in #191) to get correct tag of the view; Also this PR optimizes performance in case if you have a lot of `KeyboardAwareScrollView`'s in stack-navigator - before it would scroll all these ScrollView whenever keyboard appears, but now it scrolls only `KeyboardAwareScrollView` that is actually visible 馃憖 Closes #336 ## 馃摙 Changelog ### Docs - added a reference about `parentScrollViewTarget`; ### JS - added `parentScrollViewTarget` to types declaration; - added `parentScrollViewTarget` to specs; - started to use `parentScrollViewTarget` in `KeyboardAwareScrollView` component; - added a mock + updated unit tests; ### iOS - find `parentScrollViewTarget` and send it to JS; ### Android - find `parentScrollViewTarget` and send it to JS; ## 馃 How Has This Been Tested? Tested manually on: - Pixel 7 Pro (Android 14); - iPhone 15 Pro (iOS 17.2); ## 馃摳 Screenshots (if appropriate): https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/3d0e430a-b284-4038-bddc-1e6462649f4f ## 馃摑 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
- Loading branch information
1 parent
031c64c
commit 49124f9
Showing
18 changed files
with
101 additions
and
2 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
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