```
Navigation.dismissOverlay(this.props.componentId);
Navigation.events().registerComponentDidAppearListener(({componentId, componentName}) => {
//Here Not working
});
I'm not sure I understand the issue. Can you please PR a failing detox e2e test?
@guyca
i has two pages:A and B, and in Page B, i showOverlay component C .
Navigation.dismissOverlay(this.props.componentId);
Navigation.events().registerComponentDidAppearListener(({componentId, componentName}) => {
console.log(componentName) // result
});
console log result:
from page A to page B : print "B"
from page B to page A: print "A"
in page B show overlay C: print "C"
in page B hide overlay C: nothing has print, callback not work
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Any updates on this?!?! We've got the same problem.... :(
@qiepeipei did you find any solution?
Navigation.events().registerCommandListener((name, { componentId }) => {
console.log(name, componentId)
})
returns
Also showOverlay, undefined
You can hardcode the id of the overlay:
Navigation.showOverlay({
component: {
name: 'test',
id: 'test',
options: {
layout: {
backgroundColor: 'transparent',
},
overlay: {
interceptTouchOutside: false,
},
},
},
})
Then you know the id beforehand and can close it by Navigation.dismissOverlay('test)
This is still an issue in 4.5.3!
@Eldavid If I understand the issue correctly, you're expecting componentDidAppear event to be emitted after an Overlay is dismissed.
componentDidAppear isn't emitted after Overlay is dismissed since when an Overlay is displayed, no screen disappears. Overlay is displayed in a different hierarchy level and doesn't cause screens in the app root or modals to disappear.
Really, you are right! This is the expected behaviour.
Most helpful comment
Any updates on this?!?! We've got the same problem.... :(
@qiepeipei did you find any solution?