We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8964c06 commit 5e4f00dCopy full SHA for 5e4f00d
1 file changed
src/utilities/findNodeHandle.web.ts
@@ -12,6 +12,7 @@ import {
12
interface ScrollComponentInternals {
13
/** Available on ScrollView, FlatList, etc. to get the underlying native scroll ref */
14
getNativeScrollRef?: () => NodeHandle | null;
15
+ getScrollableNode?: () => NodeHandle | null;
16
/** Internal property on VirtualizedList storing the scroll ref */
17
_scrollRef?: NodeHandle | null;
18
}
@@ -45,6 +46,15 @@ export function findNodeHandle(
45
46
47
} catch {}
48
49
+ try {
50
+ if (typeof scrollable.getScrollableNode === 'function') {
51
+ nodeHandle = scrollable.getScrollableNode();
52
+ if (nodeHandle) {
53
+ return nodeHandle;
54
+ }
55
56
+ } catch {}
57
+
58
if (scrollable._scrollRef != null) {
59
return scrollable._scrollRef;
60
0 commit comments