-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
after change to ver 2.0.0 #31
Comments
@Tkoefod Hi there! Have you read about the breaking change introduced with version 2.0.0? |
Yes I did read about the breaking changes, and now it works but only if I delay loading your component until after the init render for some reason, but at least it works now I just don't run the component until the componentDidMount execs. I took your component back all the way to basics and it still wouldn't run for me before, my guess without looking into your code much is something about my layout that it depends on for sizing? Anyhow great component otherwise and I love it. |
@Tkoefod You are fetching some data, aren't you? My guess is that you're trying to render the carousel while it has no child at all. Am I right? Indeed, this would fail since the component depends on children's length. I would recommend you to render the carousel conditionally. Something along those lines:
Do not hesitate to share some code if this doesn't do the trick! |
I believe this is the same bug.
My Code is very simple
|
@JakeRawr Have you tried without the
Could you give it a try ? @bd-arc In fact, with momentum disabled, I already faced some troubles with Maybe there is something to do in the |
@Jonarod Thanks for getting back to me so quickly removing I'm going to take some time and run the exact code from the example folder. I may be missing something. |
@JakeRawr I can see that your carousel has two children but you've set @Jonarod Thank you for your investigation. You're absolutely right: |
@Jonarod Well, this isn't going to be a walk in the park. I've created a dedicated issue so that everyone can find out why and provide ideas... |
@JakeRawr @bd-arc The problem is with un-handled exception in
Two possibile solutions.
|
I could submit a PR if you want |
@chitezh Thank you very much for the PR! This has been merged and published ;) |
Thank you guys for fixing this! I've gotten it to work. I do have another problem with enableMomentum but create another issue to discuss the problem. |
when trying to change to the new version all I get is an error on some length as follows:
Cannot read property 'length' of undefined
handleException @ ExceptionsManager.js:63
handleError @ InitializeCore.js:114
reportFatalError @ error-guard.js:44
guard @ MessageQueue.js:48
callFunctionReturnFlushedQueue @ MessageQueue.js:107
(anonymous) @ debuggerWorker.js:71
ExceptionsManager.js:71 Unhandled JS Exception: Cannot read property 'length' of undefined
The text was updated successfully, but these errors were encountered: