-
Notifications
You must be signed in to change notification settings - Fork 41
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
vue-masonry-css makes first components loaded unreactive #9
Comments
Could there be a conflict with the lazy-load/fade-in image plugin your using? Maybe theres a way to tell that plugin of the updated positions. Is it just the images or are you seeing other events breaking? Nice showcase by the way! |
@paulcollett: thanks for the quick response I'm glad you like it. I'm launching it tomorrow on Product Hunt :) Every events (@click...) and component methods (mounted()) are disabled for the first components. |
I'm getting the exact same thing! |
@tchret what did you end up using? |
@mbarwick83 did my own grid 🤡 |
This seems reoccuring and something I'll look into. @tchret Any tips on what you came up? |
Same issue here. When using other vue components inside masonry they become unresponsive. |
Hi there, just wanted to say the component is awesome and it's being incredibly useful and efficient with me. Unfortunately I also have this issue, trying to evoke a custom component @input event inside masonry. I'm also not sure of the best solution for so... Would there be any way to map any sort of event from masonry to it's child rendered components? Maybe using slots instead of creating the elements directly on template? I'm not sure. In any case, thanks for the simple solution! |
I'm quite late to the party and initial link is down already, but while using infinite-loading + progressive-img everything works like a char. Maybe something to consider? |
Hi, I had such similar issue. My workaround is to destroy masonry component before recreating it:
In my opinion, that's an heavy bug :( |
Have the same issue. Data changes in store do nor render to the screen. Kind of a deal braker for us ... |
@wouterfovel and @thibaultbrocheton just use :key inside transition to force rerender of the component
Referenced from -> https://vuejs.org/v2/api/#key |
After we change a dimension's name, the db is updated and the vuex state mutates to these changes (state.dimensions mutates). |
Same error here :( |
Same issue, nothing in this thread has worked :(. I have to run a refresh after I load all the items and it's a deal breaker. |
We ran into the same issue and ended up using a Flexbox alternative, but first narrowed it down to a couple of problems:
Here's a simple Codepen demo illustrating the issues The 2nd issue is also related to this check which returns early when
Second recalculate:
We were able to get around this by explicitly calling As for the 1st issue, we think it has something to do with how Vue tracks |
Wrap all child components in a
|
That doesn't help. In @sbine codepen the components are already wrapped in |
Am also facing this problem, which is a deal-breaker :( |
I also am having this issue which is a real bummer because I really like this solution otherwise. |
@paulcollett you think you can find a solution? |
Hello everyone. So I think I found a solution to this problem for myself anyways. I had a pretty typical use case that is something like this:
in my card component on re-size to 700px I would lose all my reactivity like everyone here. I read through @paulcollett 's script and saw that he was only grabbing the initial slot element for rerendering and had a sneaking suspicion that his script or Vue's render() function or something only cared about the initial child elements functionality, in this case that span tag. So I did an experiment like this:
And sure enough on re-size my components kept their reactivity. SO, having done some work with Angular I wondered if there was some way to create that loop without nesting in another element like with ng-template and sure enough there is. You can nest template elements. So I tried something like this:
and sure enough, everything seems to be working! Hope this helps. |
@tcober Seems like a useful workaround, however I'm also using a draggable component to my implementation, which means I can't get the required root-level structure :( |
I'm facing a weird issue, the first components in the grid arent reactive anymore: see live
here is a previous production deployment , where everything works fine
🤔
The text was updated successfully, but these errors were encountered: