-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
how to React.forwardRef to HeaderButton #78
Comments
hello and thanks for the comment!
I'm planning to make a change to the underlying touchables soon, and I'll do it then. I'm waiting for software-mansion/react-native-gesture-handler#1069 to be released |
hi @vonovak, great news thanks for your feedback, keep in touch 👍 |
@outaTiME hi, out of curiosity, may I ask why you need the refs? Thanks! |
hi @vonovak, good one question 😄 I was needing this to pass the reference to the <MaterialHeaderButtons>
<Item
title="more"
iconName="more-horiz"
onPress={(evt) => {
const anchor = findNodeHandle(evt.nativeEvent.target);
const options = ['Delete', 'Save', 'Cancel'];
const destructiveButtonIndex = 0;
const cancelButtonIndex = 2;
showActionSheetWithOptions(
{
options,
cancelButtonIndex,
destructiveButtonIndex,
// iPad only
anchor,
},
(button_index) => {
// action
}
);
}
/>
</MaterialHeaderButtons> |
@outaTiME hi! I updated the touchables implementation but I don't have time for the ref change; feel free to open a RP, thanks! |
hi guys,
in need to pass ref to HeaderButton to get Touchable references, it could be possible to export HeaderButton as forwardRef,
Thanks !!
The text was updated successfully, but these errors were encountered: