@umituz/react-native-bottom-sheet 1.2.3 → 1.2.4
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.2.
|
|
3
|
+
"version": "1.2.4",
|
|
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",
|
|
@@ -218,14 +218,11 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
218
218
|
// Expose ref methods (must be before early return to maintain hook order)
|
|
219
219
|
React.useImperativeHandle(ref, () => ({
|
|
220
220
|
present: () => {
|
|
221
|
+
// @gorhom/bottom-sheet's present() automatically opens from bottom to first snap point
|
|
222
|
+
// useReanimatedReady() ensures GorhomBottomSheetModal is only rendered when Reanimated is ready
|
|
223
|
+
// So we can safely call present() without additional delays
|
|
221
224
|
if (isMounted && modalRef.current) {
|
|
222
|
-
|
|
223
|
-
// Use requestAnimationFrame to ensure the component is fully ready
|
|
224
|
-
requestAnimationFrame(() => {
|
|
225
|
-
if (modalRef.current) {
|
|
226
|
-
modalRef.current.present();
|
|
227
|
-
}
|
|
228
|
-
});
|
|
225
|
+
modalRef.current.present();
|
|
229
226
|
}
|
|
230
227
|
},
|
|
231
228
|
dismiss: () => {
|