Skip to content

Commit 5e4f00d

Browse files
authored
fix: updated getting scrollable ref for BottomSheetSectionList on Web 5.2.10 (#2662) (by @rozhkovs)
1 parent 8964c06 commit 5e4f00d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/utilities/findNodeHandle.web.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
interface ScrollComponentInternals {
1313
/** Available on ScrollView, FlatList, etc. to get the underlying native scroll ref */
1414
getNativeScrollRef?: () => NodeHandle | null;
15+
getScrollableNode?: () => NodeHandle | null;
1516
/** Internal property on VirtualizedList storing the scroll ref */
1617
_scrollRef?: NodeHandle | null;
1718
}
@@ -45,6 +46,15 @@ export function findNodeHandle(
4546
}
4647
} catch {}
4748

49+
try {
50+
if (typeof scrollable.getScrollableNode === 'function') {
51+
nodeHandle = scrollable.getScrollableNode();
52+
if (nodeHandle) {
53+
return nodeHandle;
54+
}
55+
}
56+
} catch {}
57+
4858
if (scrollable._scrollRef != null) {
4959
return scrollable._scrollRef;
5060
}

0 commit comments

Comments
 (0)