if you want to open the modal just use the initial snap points.
For Example: snapPoints={[200, 100, 0]}
this.refs.BottomSheet.current.snapTo(200) // To Open Full Modal in onPress Function add value of 200;
this.refs.BottomSheet.current.snapTo(0) // To Close Modal change the value to 0;
Hope it helps :)
Hi, the ref method is not working.
this.sheetRef = React.createRef(); (inside props constructor) ref={this.sheetRef} as prop of the BottomSheet component.
Then onPress button I call a function that do this: this.sheetRef.current.snapTo('50%');
returning error: undefined is not an object (evaluating 'snapPoint.tension')
this.sheetRef.current.snapTo('50%'); //here you was wrong. please use array index number instead of '50%'.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
if you want to open the modal just use the initial snap points.
For Example: snapPoints={[200, 100, 0]}
this.refs.BottomSheet.current.snapTo(200) // To Open Full Modal in onPress Function add value of 200;
this.refs.BottomSheet.current.snapTo(0) // To Close Modal change the value to 0;
Hope it helps :)
Hi, the ref method is not working.
this.sheetRef = React.createRef(); (inside props constructor)
ref={this.sheetRef} as prop of the BottomSheet component.
Then onPress button I call a function that do this:
this.sheetRef.current.snapTo('50%');
returning error: undefined is not an object (evaluating 'snapPoint.tension')
this.sheetRef.current.snapTo('50%'); //here you was wrong. please use array index number instead of '50%'.