-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] | BottomSheetFlatList not supported when newArchEnabled=true #1726
Comments
@gorhom can you please check this issue or any suggestion to solve that issue |
@gorhom we are also waiting for that |
@AndreiCalazans could you please check above issue |
@vijaychouhan-rails since you have a reproducible at hand can you debug it and see how the library can retrieve the nativeTag when the new architecture is enabled? I suggest you add a console.log to the ref received as argument here. You can modify the function directly inside node_modules at We are looking for the nativeTag or a similar tag. If that tag no longer exists with the new architecture than we will need to revisit the entire logic that depends on it. If you can paste what you see from the logs here we can help debug it. Thank you. |
@AndreiCalazans Thanks for your reply. Please check below code and logs this is code
|
Yeah, I was looking at the recent changes and found a refactor. After reversing the changes, it works fine. Version: diff --git a/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollable.ts b/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollable.ts
index 3963175..4a38f26 100644
--- a/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollable.ts
+++ b/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollable.ts
@@ -1,8 +1,8 @@
import { useCallback, RefObject, useRef } from 'react';
import { useSharedValue } from 'react-native-reanimated';
-import { getRefNativeTag } from '../utilities/getRefNativeTag';
import { SCROLLABLE_STATE, SCROLLABLE_TYPE } from '../constants';
import type { ScrollableRef, Scrollable } from '../types';
+import { findNodeHandle } from 'react-native';
export const useScrollable = () => {
// refs
@@ -38,7 +38,7 @@ export const useScrollable = () => {
// find node handle id
let id;
try {
- id = getRefNativeTag(ref);
+ id = findNodeHandle(ref.current);
} catch {
return;
}
diff --git a/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollableSetter.ts b/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollableSetter.ts
index ea7d3c2..1cae2e2 100644
--- a/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollableSetter.ts
+++ b/node_modules/@gorhom/bottom-sheet/src/hooks/useScrollableSetter.ts
@@ -1,9 +1,9 @@
import React, { useCallback, useEffect } from 'react';
import Animated from 'react-native-reanimated';
import { useBottomSheetInternal } from './useBottomSheetInternal';
-import { getRefNativeTag } from '../utilities/getRefNativeTag';
import { SCROLLABLE_TYPE } from '../constants';
import type { Scrollable } from '../types';
+import { findNodeHandle } from 'react-native';
export const useScrollableSetter = (
ref: React.RefObject<Scrollable>,
@@ -31,7 +31,7 @@ export const useScrollableSetter = (
isContentHeightFixed.value = false;
// set current scrollable ref
- const id = getRefNativeTag(ref);
+ const id = findNodeHandle(ref.current);
if (id) {
setScrollableRef({
id: id, |
Can confirm downgrading to v4.4.4 solves this issue for me, at the cost of some newer features. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
posted the revert #1823 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Bug
Environment info
Steps To Reproduce
And its throwing from this code
react-native-bottom-sheet/src/utilities/getRefNativeTag.ts
Line 30 in 1128dc8
Describe what you expected to happen:
Reproducible sample code
The text was updated successfully, but these errors were encountered: