Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Configurable HTML element #23

Closed
TomiTakussaari opened this issue Mar 6, 2018 · 5 comments · Fixed by #24
Closed

Configurable HTML element #23

TomiTakussaari opened this issue Mar 6, 2018 · 5 comments · Fixed by #24

Comments

@TomiTakussaari
Copy link

TomiTakussaari commented Mar 6, 2018

Thanks for the library, solved one of my problems nicely.

However, currently react-on-visible always renders <div>, but <div> is not valid child everywhere, eg. under <p>.

Could this element be made configurable ?

main.js:12974 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
    in div (created by OnVisible)
@dazld
Copy link
Owner

dazld commented Mar 8, 2018

thanks for the nice words, I'm glad this helped!

the element which we use to wrap can definitely be made configurable. It sounds like you want to track visibility of an inline element - is that right? something like an inline image or an anchor..? I can have a play with something, and put up a PR.

@dazld
Copy link
Owner

dazld commented Mar 8, 2018

@TomiTakussaari would appreciate if you could take that branch for a spin, and see if it works for you!

@dazld
Copy link
Owner

dazld commented Mar 8, 2018

hm, actually, this doesn't look too controversial to me. I'll publish this as a new version, and then let me know how you get on.

@dazld dazld closed this as completed in #24 Mar 8, 2018
@dazld
Copy link
Owner

dazld commented Mar 8, 2018

published as 1.5.0

@TomiTakussaari
Copy link
Author

Yeah, I needed to track inline image, and 1.5.0 seems to do the trick, thanks!

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

Successfully merging a pull request may close this issue.

2 participants