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

toggle the drawer state #11

Closed
FelipeCorerato opened this issue Apr 8, 2019 · 14 comments · May be fixed by #14
Closed

toggle the drawer state #11

FelipeCorerato opened this issue Apr 8, 2019 · 14 comments · May be fixed by #14

Comments

@FelipeCorerato
Copy link

hello! is there any way to change the drawer's mode (opened to closed/closed to opened) by a button or touchable opacity?

@jacklein
Copy link
Owner

Not currently but that is a nice feature. I will work on it or anyone else can put a PR in.

@matinzd
Copy link

matinzd commented Apr 17, 2019

Not currently but that is a nice feature. I will work on it or anyone else can put a PR in.

hello! is there any way to change the drawer's mode (opened to closed/closed to opened) by a button or touchable opacity?

Its on the way and I created pull request

@FelipeCorerato
Copy link
Author

wow thank you @matinzd !! can you notify me when the request is approved?

@GwnElviin
Copy link

Would be nice if this gets implemented, really want to add functionality to a button so i can open/close the drawer

@matinzd
Copy link

matinzd commented May 1, 2019

Would be nice if this gets implemented, really want to add functionality to a button so i can open/close the drawer

Fork my repo and use it

@GwnElviin
Copy link

GwnElviin commented May 1, 2019

Would be nice if this gets implemented, really want to add functionality to a button so i can open/close the drawer

Fork my repo and use it

I forked your repo but i dont know how to use it.
Would you mind posting an example?
@matinzd

@matinzd
Copy link

matinzd commented May 5, 2019

Would be nice if this gets implemented, really want to add functionality to a button so i can open/close the drawer

Fork my repo and use it

I forked your repo but i dont know how to use it.
Would you mind posting an example?
@matinzd

Just create reference from component and then use these methods as you want ..

 <BottomDawer ref={ref => this.drawer = ref} />

  this.drawer.setDrawerState(state) // Can be accessed by BottomDrawer.DOWN_STATE or BottomDrawer.UP_STATE

  this.drawer.toggleDrawerState()

  this.drawer.openBottomDrawer() 

  this.drawer.closeBottomDrawer()

@ansarikhurshid786
Copy link

@matinzd thanks i will check your repository.

@ansarikhurshid786
Copy link

@matinzd No, it is not working. i am getting error - toggleDrawerState or other all function is undefined.

@matinzd
Copy link

matinzd commented Jun 7, 2019

@matinzd No, it is not working. i am getting error - toggleDrawerState or other all function is undefined.

Please provide me your code

@ansarikhurshid786
Copy link

ansarikhurshid786 commented Jun 8, 2019

<View>
   <Text style={{color:"red"}}> Welcome to React Native! </Text>
   <Button onPress={()=>{
         this.drawer.closeBottomDrawer();
      }} title="Toggle" />
      <BottomDrawer ref={ (ref)=> this.drawer = ref} containerHeight={200} offset={49}>
         <Text> Get directions to your location </Text>
      </BottomDrawer>
</View>

@nomanmakh098
Copy link

i am having the same issue as above

@alanupstone
Copy link

Hello. Did anyone have any luck? I am using the great bit if code within a functional component not a class, so 'this' can't be used. Thanks.

@rishav95
Copy link

rishav95 commented Jun 3, 2020

If anyone is still looking for alternatives for this library, since this one seems to have been abandoned

https://github.com/osdnk/react-native-reanimated-bottom-sheet

this one works pretty well and provides a lot more control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants