Running v1.0.8 on iOS with the New Architecture (Fabric) enabled, passing a float value (e.g., 350.5) to the peekHeight property causes it to fail parsing.
Observation:
- On iOS (Fabric): The property is ignored and the component reverts to its default value of 200, which is very confusing for developers.
Root Cause:
In src/BottomSheetNativeComponent.ts of v1.0.8, peekHeight is strictly defined as CodegenTypes.Int32.
peekHeight?: CodegenTypes.WithDefault<CodegenTypes.Int32, 200>;
In the Fabric C++ layer on iOS, the type mismatch between a JS Number (double) and the required Int32 causes the property mapping to fail, thus triggering the WithDefault fallback.
Suggested Fix:
Change the Codegen type to Float or Double to improve compatibility and support fractional offsets.
- peekHeight?: CodegenTypes.WithDefault<CodegenTypes.Int32, 200>;
+ peekHeight?: CodegenTypes.WithDefault<CodegenTypes.Float, 200>;
Environment:
- Package Version: @sdcx/bottom-sheet@1.0.8
- Platform: iOS (Fabric Enabled)
- React Native: 0.81.0