Dynamic redrawing in Masonry

I use nested Repeat. They also have Masonry. Inside masonry there are elements that user can hide or show. Previously, all Masonry tiles were rebuilt dynamically. Now it doesn’t work. Now if I hide an element, it leaves an empty space. If I show an item it is shown on top of the others. I have no idea how it worked before, so I don’t see any way I can fix it. I will be very glad to any advice.

Hi.
Haven’t tested this… but try checking if your repeats have KEY defined.

I tried adding Unique Key but when I try to select something there is just data and nothing else, no fields and nothing can be selected. This may be because Wappler has this problem: If you add filtering (where) in Repeat/Masonry, your fields will probably not be visible anymore. I do it like this. First I add a data source, then I customize all html elements that will take data from the Repeat source. And only then I add filtering. If I need to change something I either fix it in the code or have to remove the filtering… Uncomfortable, but tolerable :slight_smile: :slight_smile: I’m very much waiting for such errors to be eliminated.

I removed the filtering and the fields appeared. It’s definitely a bug. :frowning:

Unfortunately adding Unique Key didn’t help to revive the rebuilding of Masonery when changing the visibility of its elements.

If you have Git, you can revert to some older version to compare what has actually change.
The issue could be due to AC2 update as well.

I tried downloading and using a previous version of the dmxMasonry.js file. The behavior has changed (worsened), but the effect I need (dynamic rearrangement of elements when showing and hiding elements) has not appeared. However, I don’t have the previous dmxMasonry.js.map file in GIT. In general, the hybrid of old and new files did not give any result. Maybe some other files are important for Masonry.

Trying to compare the code of dmxMasonry.js that is now with the one that was has not led to anything yet. The code is similar, but changed a lot. It’s not easy to figure out what exactly prevents from dynamically rebuilding elements when hiding part of them.

The last version of dmxMasonry was 1.0.4 and I found some mention of this component here https://www.dmxzone.com/go/33032/app-connect-masonry/.
However, now Wappler is using version 2.0.0 and I haven’t found anything about it yet. It seems that dmxzone.com has not been updated since 2022. It’s a bit scary what will happen to DMX technology in the future…

DMX was the older product of the Wappler team.
It has nothing to do with Wappler - except that it has references in code still.

If you were unable to find difference in the masonry JS file, and you cannot revert your code back to how it was, it will be difficult to reproduce the problem you are facing.

So the better option would be to maybe share a video and some code snippets of what your configuration is and how the problem looks visually. If you have a live link, even better.
Maybe someone from community may be able to help you.

I understand that the new version (2) of Masonry works a little differently. I’m not sure if the bug is in my settings in Wappler because it’s very simple. I set the data source - everything works correctly - the data is displayed. Then in Card Body I configured dynamic attribute “Show” and specified mycheckbox.checked as a parameter. And it all works too - the Card Body element is hidden and shown as it should be. But before Masonry automatically rebuilt the tiles, but now it doesn’t happen. :frowning: You can see it on the pictures.

Fixed now in Wappler 6.5.4

Thank you very much! :slight_smile:

This topic was automatically closed after 25 hours. New replies are no longer allowed.