Skip to content
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] | [v2] Mapbox MapView is overflowing to backdropComponent when scrolling. #1933

Open
nabilseid opened this issue Sep 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nabilseid
Copy link

nabilseid commented Sep 12, 2024

Bug

BottomSheetScrollView fails to hide Mapbox on backdrop area when scrolling. It hides other elements but Mapview is still visible. I tried z-index, setting overflow to hidden. Nothing worked. The issue is happening on android. I haven't tested it in iOS.


Environment info

Library Version
@gorhom/bottom-sheet 4.6.4
react-native 0.74.2
react-native-reanimated 3.10.1
react-native-gesture-handler 2.16.1

Reproducible sample code

const renderBackdrop = useCallback(
    (props: any) => (
      <BottomSheetBackdrop
        {...props}
        pressBehavior="collapse"
      />
    ),
    []
  );

const renderMap = useCallback(
    (mapData, index) => (
      <MapCard key={index} mapData={mapData} />
    ),
    []
 );

return (
    <>
      {/* Floating Button */}
      <Animated.View style={[animatedCloseWrapper]}>
        {props.floatingHeader && props.floatingHeader()}
      </Animated.View>

      <BottomSheet
        ref={bottomSheetRef}
        snapPoints={snapPoints}
        index={1}
        backdropComponent={renderBackdrop}
        enablePanDownToClose={false}
        animatedPosition={bottomSheetPosition}
      >
        <BottomSheetScrollView style={{ padding: 15 }}>
          {data && data.map(renderMap)}
        </BottomSheetScrollView>
      </BottomSheet>
    </>
  );

BottomSheetScrollView seems to work fine without MapBox.

@nabilseid nabilseid added the bug Something isn't working label Sep 12, 2024
Copy link

@nabilseid: hello! 👋

This issue is being automatically closed because it does not follow the issue template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant