Skip to content

[iOS][Fabric][v1.0.8] peekHeight property fails to parse float values, resulting in fallback to default value (200) #80

@cd-butterfly

Description

@cd-butterfly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions