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

Cannot read property 'ref' of undefined #161

Closed
Alireza29675 opened this issue May 16, 2022 · 2 comments
Closed

Cannot read property 'ref' of undefined #161

Alireza29675 opened this issue May 16, 2022 · 2 comments

Comments

@Alireza29675
Copy link

Hey! I hope you're doing great!

This is the error that I'm facing:

TypeError: Cannot read properties of undefined (reading 'ref')
    at ReflexContainer.getSize (ReflexContainer.js:232:1)
    at ReflexContainer.computeAvailableStretch (ReflexContainer.js:362:1)
    at ReflexContainer.computeAvailableOffset (ReflexContainer.js:323:1)
    at ReflexContainer.js:108:1
    at new Promise (<anonymous>)
    at ReflexEvents.<anonymous> (ReflexContainer.js:101:1)
    at ReflexEvents.emit (ReflexEvents.js:55:1)
    at ReflexElement.componentDidUpdate (ReflexElement.js:111:1)
    at commitLifeCycles (react-dom.development.js:22117:1)
    at commitLayoutEffects (react-dom.development.js:25344:1)

And it is happening only when the container and elements get initialized and one element has initial size.

I have two elements with a splitter between and I want the second element to have an initial size but it won't set and it logs this error. (Can it be thrown so I can handle it somewhere at least? console.log is not fair😄)

I put the windowResizeAware prop on the container and the interesting point is that when the window gets resized the second element will adopt its correct size. I'm really confused btw.

@leefsmp
Copy link
Owner

leefsmp commented May 16, 2022

Can you take a look at #101 see if that helps first. Otherwise would definitely need to look at a sample or sandbox demo to tell anything more than this. Thanks

@Alireza29675
Copy link
Author

Looked for the closed issues but missed this one! Thank you, Philippe 🍻

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

2 participants