Closed
Description
I’m using react native share, to share text content. The issue is multiple share dialog are opened over each other on clicking share button multiple times. Even I have disabled button on share click but it is of no use as well.
Expected Behavior
The standard way is if share dialoge is already open, on clicking the share button again the window get closed. How can it be done?
Actual Behavior
Opening multiple share dialogs.
Environment
"react-native": "0.50.3",
Steps to Reproduce
<Button
transparent
disabled={this.state.isShareDisabled}
onPress={() => that.onShare(index)}>
onShare() {
if(!this.state.isShareDisabled)
{
this.setState(
{
isShareDisabled:true
}
)
Share.share({
message: “Message test”,
url: ”www.google.com”,
title: “Title test”
}, {
// Android only:
dialogTitle: 'Share',
// iOS only:
excludedActivityTypes: [
'com.apple.UIKit.activity.PostToTwitter'
]
}) .then((result) => {
this.setState(
{
isShareDisabled: false,
}
)
})
}
}