Commit 29de1d0
authored
* Expose Pressability Hover config props in Pressable (facebook#32405)
Summary:
Several desktop forks (`react-native-macos`, `react-native-windows`, `react-native-web`) support mouse events, and while the stock Pressable component has the ability to support mouse events, it seems we aren't forwarding some props properly from Pressable -> Pressability.
Pressability will calculate onMouseEnter / onMouseLeave event handlers based on the `onHoverIn/onHoverOut` callbacks passed into PressabilityConfig.
https://github.com/facebook/react-native/blob/ad0d4534a751ed05f84ff971714c8f7a4d1deb3a/Libraries/Pressability/Pressability.js#L552
However, Pressable does not pass take in onHoverIn/onHoverOut props to pass to PressabilityConfig, so we can't take advantage of this functionality. This change should simply address that by passing the props through.
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Fixed] - Pressabel not passing hover props and event handlers to PressabilityConfig
Pull Request resolved: facebook#32405
Test Plan: I fixed a similar issue in `react-native-macos` that I am now trying to contribute back upstream. #855
Reviewed By: yungsters
Differential Revision: D31667737
Pulled By: sota000
fbshipit-source-id: f0bbe48302703bb2c45280d2afeec8d7a4586b6a
* Additional changes
* undo extra unnecessary changes
* remove another line
* update podfile lock
1 parent 3aa7acb commit 29de1d0
File tree
3 files changed
+271
-247
lines changed- Libraries/Components/Pressable
- RNTester
- js/examples/Pressable
3 files changed
+271
-247
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
94 | 114 | | |
95 | 115 | | |
96 | 116 | | |
| |||
141 | 161 | | |
142 | 162 | | |
143 | 163 | | |
144 | | - | |
145 | | - | |
146 | 164 | | |
147 | 165 | | |
148 | 166 | | |
| |||
162 | 180 | | |
163 | 181 | | |
164 | 182 | | |
| 183 | + | |
| 184 | + | |
165 | 185 | | |
166 | 186 | | |
167 | 187 | | |
168 | | - | |
169 | | - | |
| 188 | + | |
| 189 | + | |
170 | 190 | | |
171 | 191 | | |
172 | 192 | | |
| |||
192 | 212 | | |
193 | 213 | | |
194 | 214 | | |
| 215 | + | |
| 216 | + | |
195 | 217 | | |
196 | | - | |
197 | | - | |
| 218 | + | |
| 219 | + | |
198 | 220 | | |
199 | 221 | | |
200 | 222 | | |
| |||
220 | 242 | | |
221 | 243 | | |
222 | 244 | | |
| 245 | + | |
| 246 | + | |
223 | 247 | | |
224 | 248 | | |
225 | 249 | | |
226 | | - | |
227 | | - | |
| 250 | + | |
| 251 | + | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
| |||
0 commit comments