Commit e0a6c09
authored
## 📜 Description
Fixed firing of `onScroll` in `KeyboardAwareScrollView`
## 💡 Motivation and Context
Initially it was fixed in
#339
and I'm sure it was working 😅
However it looks like in current setup (RN 0.73, REA 3.8.0) such way is
not working and `onScroll` property still gets ignored 😔
So in this PR I followed a different path: initially I wanted to fire
this handler via `runOnJS`, but we can not follow a full signature of
the method, since REA has only `nativeEvent` property (and indeed in
this case some properties would be simply missing).
The different path was to update a shared value from JS thread and call
a callback as usually - it fixes a problem in old code and in a new, so
for now this approach looks decent 👍
Let's see how it works in a wild life 👀
Also in this PR I'm changing content of `tea.yaml` - it should be done
in separate PR, but I don't want to open another PR just to fix quotes,
so decided to merge everything in a single one 🙈
Closes
#337
## 📢 Changelog
### JS
- fire `onScroll` in callback;
- react on scroll position change in JS thread.
### FS (file system)
- added single quotes `'` for `tea.yaml`;
## 🤔 How Has This Been Tested?
Tested manually on iPhone 15 Pro.
## 📸 Screenshots (if appropriate):
<img width="474" alt="image"
src="https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/11896adc-3fdd-4ab3-acf9-9f32f27e787c">
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
1 parent 94f45ed commit e0a6c09
File tree
3 files changed
+11
-10
lines changed- src/components/KeyboardAwareScrollView
3 files changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
325 | 324 | | |
326 | 325 | | |
327 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
0 commit comments