You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @JakeGinnivan ,
First, thanks for your work on react-popout :)
I'm using it in a project and I need to access the window that was opened in my parent component.
To do that, I tried to use the window prop. In the README, you say it need to be an object with a open method on it. So I just did that, I pass an object like this:
However, I get an error that (this.props.window || window).removeEventListener is not a function
So my fake window actually might need a few other methods to work properly. I was wondering if you had a comprehensive list of the methods I should implement, so that I'm sure that it won't break?
Another solution to my problem would be to have a callback prop that would be called once the window is opened, passing the window object in argument, like so:
Hi @JakeGinnivan ,
First, thanks for your work on react-popout :)
I'm using it in a project and I need to access the window that was opened in my parent component.
To do that, I tried to use the window prop. In the README, you say it need to be an object with a
open
method on it. So I just did that, I pass an object like this:However, I get an error that
(this.props.window || window).removeEventListener is not a function
So my fake window actually might need a few other methods to work properly. I was wondering if you had a comprehensive list of the methods I should implement, so that I'm sure that it won't break?
Another solution to my problem would be to have a callback prop that would be called once the window is opened, passing the window object in argument, like so:
Any intention to do that in the future? Tell me if you'd like a PR for this.
The text was updated successfully, but these errors were encountered: