react-native-action-sheet icon indicating copy to clipboard operation
react-native-action-sheet copied to clipboard

Are we able to provide a callback to the cancel button?

Open youngrichard opened this issue 3 years ago • 3 comments

Since we do not define the action of the cancel button, is there any way we can supply a callback action to fire when the cancel button is pressed?

Thank you

youngrichard avatar May 05 '22 22:05 youngrichard

@youngrichard what is the use case? It could be helpful when thinking of possible implementation. Thanks.

bradbyte avatar May 10 '22 14:05 bradbyte

Our use case involves tracking user interactions, which we can do for the other buttons, but not cancel.

youngrichard avatar May 11 '22 00:05 youngrichard

https://github.com/expo/react-native-action-sheet/blob/master/src/ActionSheet/index.tsx#L241-L242

I think this results in the onPress being called with the cancelIndex... is that not what you're seeing?

bradbyte avatar May 12 '22 20:05 bradbyte