-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Referencing the SnapTo function of the App Class BottomSheet within another component. #16
Comments
@hartytech I did not get you. can you provide reproducible code + elaborate more on your problem? |
Sure. I have my BottomSheet component placed within my main <BottomSheet
keyboardAware={false}
bottomSheerColor="#FFFFFF"
ref="BottomSheet"
initialPosition={0} //200, 300
snapPoints={['0%','40%']}
isBackDrop={true}
isBackDropDismissByPress={true}
isRoundBorderWithTipHeader={true}
// backDropColor="red"
// isModal
tipHeaderRadius={20}
// headerStyle={{backgroundColor:"red"}}
// bodyStyle={{backgroundColor:"red",flex:1}}
header={
<View>
<Text >Header</Text>
</View>
}
body={
<View>
<Text >Body</Text>
</View>
}
/> With the function to change where it snaps provided above within onOpenBottomSheetHandler = (index) => {
this.refs.BottomSheet.snapTo(index);
}; This function works fine when called within |
I have gotten stuck on particular implementation of this system due to my inability to call the snap function attached to the "this" in the App Class from another component titled "Devices"
The text was updated successfully, but these errors were encountered: