FIX: Wait for transitions to finish before showing sheet

This commit is contained in:
Marcos Rodriguez Velez 2023-10-26 15:55:38 -04:00
parent c1af945439
commit bf472ab6a7
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,9 @@
import { ActionSheetIOS } from 'react-native';
import { ActionSheetIOS, InteractionManager } from 'react-native';
export default class ActionSheet {
static showActionSheetWithOptions(options, completion) {
ActionSheetIOS.showActionSheetWithOptions(options, completion);
InteractionManager.runAfterInteractions(() => {
ActionSheetIOS.showActionSheetWithOptions(options, completion);
});
}
}

View File

@ -1,7 +1,9 @@
import { Alert } from 'react-native';
import { Alert, InteractionManager } from 'react-native';
export default class ActionSheet {
static showActionSheetWithOptions(options) {
Alert.alert(options.title, options.message, options.buttons, { cancelable: true });
InteractionManager.runAfterInteractions(() => {
Alert.alert(options.title, options.message, options.buttons, { cancelable: true });
});
}
}