@umituz/react-native-bottom-sheet 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-bottom-sheet",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Modern, performant bottom sheets for React Native with preset configurations, keyboard handling, and smooth animations",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -204,7 +204,7 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
204
204
|
});
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
|
-
},
|
|
207
|
+
}, 500); // Increased delay to 500ms to ensure Reanimated is fully initialized
|
|
208
208
|
|
|
209
209
|
return () => {
|
|
210
210
|
clearTimeout(timer);
|
|
@@ -242,7 +242,12 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
242
242
|
present: () => {
|
|
243
243
|
if (isMounted && modalRef.current) {
|
|
244
244
|
// @gorhom/bottom-sheet's present() automatically opens from bottom to first snap point
|
|
245
|
-
|
|
245
|
+
// Use requestAnimationFrame to ensure the component is fully ready
|
|
246
|
+
requestAnimationFrame(() => {
|
|
247
|
+
if (modalRef.current) {
|
|
248
|
+
modalRef.current.present();
|
|
249
|
+
}
|
|
250
|
+
});
|
|
246
251
|
}
|
|
247
252
|
},
|
|
248
253
|
dismiss: () => {
|
|
@@ -47,7 +47,7 @@ export const SafeBottomSheetModalProvider: React.FC<SafeBottomSheetModalProvider
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
-
},
|
|
50
|
+
}, 500); // Delay to ensure Reanimated is fully initialized
|
|
51
51
|
|
|
52
52
|
return () => {
|
|
53
53
|
clearTimeout(timer);
|