Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: forward ref to
KeyboardAwareScrollView
(#345)
## 📜 Description Right now it's impossible to assign `ref` on `KeyboardAwareScrollView` and access `ScrollView` methods. This PR fixes this problem. ## 💡 Motivation and Context It's important to have `ref` in many cases - so I think motivation why it's needed is pretty clear 😅 The technical aspect is a little bit tricky, since internally we also use `ref` (from REA hook) and we need to propagate it from inside the component. To achieve this I added `onRef` callback that manages everything 😎 It uses single ref and derives a reanimated ref + assigns plain `ref` for typical RN usage. This PR has a lot of changes, but it's because of prettier. Main changes are `onRef` + `forwardRef` component wrap. ## 📢 Changelog ### JS - `forwardRef` on `KeyboardAwareScrollView`; - manage (clone) refs inside `KeyboardAwareScrollView` for reanimated usage + assign it to forwarded ref; ## 🤔 How Has This Been Tested? Tested manually on Xiaomi Redmi Note 5 Pro. ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
- Loading branch information