Commit ce8ccaa
authored
feat: add
## 📜 Description
Added `onContentInsetChange` callback.
## 💡 Motivation and Context
Modifying `contentInsets` changes scrollable area. In `react-native`
this event propagates through `onScroll` event. In JS I can not modify
it (this event) just because we have so many variation in terms of how
to intercept the `onScroll` event (Animated, Reanimated, plain JS
callback) so that for example for `Animated` with native driver I can
not simply modify event structure, because I'll emit event from JS but
this event is not possible to send to mobile.
So I decided to add separate `onContentInsetChange` event. At the moment
this callback will be needed in `LegendList` to implement accurate
`scrollToEnd` and other functions that depends on precise scroll
coordinates.
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### JS
- added `onContentInsetChange` callback;
## 🤔 How Has This Been Tested?
Tested manually.
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changedonContentInsetChange callback (#1445)1 parent 1048f52 commit ce8ccaa
4 files changed
Lines changed: 110 additions & 17 deletions
File tree
- docs
- docs/api/components
- versioned_docs/version-1.21.0/api/components
- src/components
- KeyboardChatScrollView
- ScrollViewWithBottomPadding
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
90 | 102 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
| |||
52 | 68 | | |
53 | 69 | | |
54 | 70 | | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
62 | 123 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 124 | + | |
67 | 125 | | |
68 | 126 | | |
69 | 127 | | |
| |||
75 | 133 | | |
76 | 134 | | |
77 | 135 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 136 | + | |
84 | 137 | | |
85 | 138 | | |
86 | 139 | | |
87 | 140 | | |
88 | 141 | | |
89 | 142 | | |
90 | 143 | | |
91 | | - | |
92 | | - | |
| 144 | + | |
| 145 | + | |
93 | 146 | | |
94 | 147 | | |
95 | 148 | | |
| |||
104 | 157 | | |
105 | 158 | | |
106 | 159 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 160 | | |
112 | 161 | | |
113 | 162 | | |
| |||
0 commit comments