Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to unMount the overlay, When I pop my scene, the overlay on this scene can't disdrory #4

Open
osdio opened this issue May 24, 2015 · 11 comments
Assignees

Comments

@osdio
Copy link

osdio commented May 24, 2015

How to unMount the overlay, When I pop my scene, the overlay on this scene can't disdrory, it show on the next scene, I don't want that.

@brentvatne
Copy link
Owner

Hi @soliury! Can you give me some example code where this happens? If you can do that I can surely fix it for you 😄

@osdio
Copy link
Author

osdio commented May 31, 2015

I have delete the wrong code.

But I can discribe in words:

I put a overlay in a sence named topic, I push the sence in a sence named tab, and then, turn to the topic sence, but when I pop this sence by use navigator.pop() it works, the overlay can disdrory, but when I use gesture to pop it , it can't disdrory, it will show in tab sence.

@brentvatne
Copy link
Owner

@soliury - thanks! I'll try to reproduce

@brentvatne brentvatne self-assigned this May 31, 2015
@albertwchang
Copy link

@soliury I wonder if you set the boolean variable that would be used by the Overlay's isVisible property to false. Set this boolean variable in the `Topiccomponent'scomponentWillUnmount()`` method...

@travisyeh
Copy link

I'm experiencing a similar issue. I have the following in my Overlay:

componentWillUnmont(){

    this.props.isVisible = false;
    this.render();
},

However, there is always about a second of lag before the Overlay actually removes itself, and it sometimes fails to do so for a few seconds. Furthermore, when I cmd+R to refresh the JS and load a new preview of my app, the Overlay stays on the simulator and doesn't remove itself. Is there another way I can reliably remove the Overlay?

Thanks so much!

@brentvatne
Copy link
Owner

If anyone has a chance to investigate this further it would be much appreciated! Unfortunately I have higher priority tasks to work and this library currently solves all of the needs that I personally have for it :)

@louuysison
Copy link

Can confirm this issue. Setting isVisible={true} then replacing the route in navigator via an async function. Overlay does not disappear and isVisible. Even refreshing the JS via react native menu does not remove the overlay. Need to close the app via app manager or Xcode. Might have something to do with how the component deals with being unmounted?

@niftylettuce
Copy link
Collaborator

Might you need to change this:

constructor(props) {
  super();
  // ... this.state or whatever
}

to this?

constructor(props) {
  super(props);
  // ... set state or whatever
}

@louuysison @Achang28 @travisyeh did you fix?

@niftylettuce
Copy link
Collaborator

See #36 - we will be refactoring this soon to support Android/iOS and not have any issues here, there will no longer be the XCode integration needed

@dvcrn
Copy link

dvcrn commented Jan 20, 2016

Similar problem here. I try to dynamically change components inside the overlay but while the component is getting destroyed, it is still drawn onto the screen. Any workaround?

@HeyItsJs
Copy link

Hey guys, I am facing the same issue. Its more than 6 years since this issue is opened. Is there any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants