react-native-raw-bottom-sheet icon indicating copy to clipboard operation
react-native-raw-bottom-sheet copied to clipboard

how to limit bottom sheet to specific height without closing it?

Open AnuragVadd opened this issue 5 years ago • 3 comments

I want to implement a bottom sheet which uses a drag behaviour (swipe down) to change the height of the bottom sheet.

expected result -

bottom sheet expanded - before

bottom sheet collapsed -

after

I have tried to set this prop - minClosingHeight={250} but it seems to be closing the bottom sheet completely. I have also tried to open the bottom sheet everytime it closes using the onClose callback this way -

 onClose={() => {
          refRBSheet.current.open();
        }}

but this seems to be closing the bottom sheet first and then re-opening it.

actual result:

20200806_121127

Is it possible to use the drag behaviour of this bottom sheet to change the height ex. from 250 to 500 when swiping the bottom sheet down? In the collapsed state, it should also be able to come back to the expanded state when swiping up.

AnuragVadd avatar Aug 06 '20 14:08 AnuragVadd

i had the same problem any solution ?

koussaimb avatar Apr 22 '21 10:04 koussaimb

+1 any news?

DmitryKvant avatar Jul 24 '21 11:07 DmitryKvant

I am also facing the same @nysamnang can u help us out with this issue

deva49 avatar Oct 11 '22 08:10 deva49

<RBSheet ref={refRBSheet} closeOnDragDown={true} closeOnPressMask={false} customStyles={{ wrapper: { backgroundColor: "transparent" }, draggableIcon: { backgroundColor: "#000", width: '20%' }, container: { ...styles.bottom, height: "30%", }, }} >

I Used this. working Fine

 container: {
        ...styles.bottom,
        height: "30%",
      },

mahesh970098 avatar Jan 27 '23 08:01 mahesh970098