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

Not working for me #6

Closed
Sigfried opened this issue Dec 1, 2016 · 5 comments
Closed

Not working for me #6

Sigfried opened this issue Dec 1, 2016 · 5 comments

Comments

@Sigfried
Copy link

Sigfried commented Dec 1, 2016

First, styled-components is listed in package.json as a dev dependency but it's apparently a regular dependency. I had to install it after npm installing react-loading-overlay. After fixing that, it's still not working for me. My render code looks like this:

if (conceptStats && typeof conceptCount !== 'undefined') {
  concepts =  <Concepts  
                conceptStats={conceptStats} 
                conceptCount={conceptCount} 
              />;
}
return  <Loadable
          active={isLoading}
          spinner={true}
          text='Loading concept stats...'
          >
            {concepts}
        </Loadable>

I see nothing whether my data is loaded or not.

It would be nice, btw, not to have to test that in the render explicitly -- if Loadable is active, it shouldn't even try to display the children.

Thanks!

@derrickpelletier
Copy link
Owner

Sorry for not getting to this sooner, i missed the notification somehow!
Will definitely address the dependency shortly, thanks for the heads up.

Regarding your second point, I guess you could go two ways. {concepts} could just be {!isLoading && concepts} which seems pretty trivial to me. Alternatively it would probably mean adding another prop to specify this behaviour, as there are many cases where you might want a loader visible over content (when saving/updating or something similar, you might want to overlay the component in question, for example).

@MichaelRando
Copy link

still broken?

@Sigfried
Copy link
Author

That's a reasonable point, @derrickpelletier.

I just noticed your response because of @MichaelRando's comment. So maybe Michael is having the same problem I was, that even when isActive is set to true, I wasn't seeing the overlay.

@ydornala
Copy link

Issue with styled-components dependency @derrickpelletier

@derrickpelletier
Copy link
Owner

dependency issue patched in commit: 4dc1247
v0.2.4 on npm

Let me know if that doesn't fix it!

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

4 participants