fix to prevent 'race' condition for screenDidDisappear event (#6298)
This commit is contained in:
parent
5dba7f2667
commit
87c2adfde2
1 changed files with 2 additions and 1 deletions
|
|
@ -206,7 +206,8 @@ const SnackBar = ({barType, componentId, onAction, sourceScreen}: SnackBarProps)
|
|||
// This effect checks if we are navigating away and if so, it dismisses the snack bar
|
||||
useEffect(() => {
|
||||
const onHideSnackBar = (event?: ComponentEvent) => {
|
||||
if (componentId !== event?.componentId) {
|
||||
const evtComponentId = event?.componentId;
|
||||
if ((componentId !== evtComponentId) && (sourceScreen !== evtComponentId)) {
|
||||
animateHiding(true);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue