ElemeFE / vue-infinite-scroll

An infinite scroll directive for vue.js.
2.85k stars 416 forks source link

Cannot be used along with `v-if` #77

Open nathanboktae opened 7 years ago

nathanboktae commented 7 years ago

I noticed when I used this on an element along with v-if that in the bind method, hook:mounted never fired even after the element appeared, so it never set itself up.

33033624 commented 6 years ago

yeah, i nice to it but i don‘t know how to resolve

Godofbrowser commented 6 years ago

Hello, has this been resolved?

wobsoriano commented 6 years ago

Any fix?

kpabi commented 6 years ago

Is there any reason to not use the directives's 'inserted hook' for initialisation instead of the component's 'mounted' hook? The former works with v-if.

ChristophWurst commented 3 years ago

I've noticed the same bug occurs when the component with the directive is rendered inside a slot. Then hook:mounted also doesn't fire.