I saw similar problem few times already and the main reason is the layout
The Collection list Wrapper has no width, then the Collection list set to width: 100% and display: flex.
When filtering happens and items getting āremovedā from the container (Collection list) it shrinks automatically because 100% of nothing (remember, no width set on its parent ) is ā¦ nothing .
So if you will make Collection List wrapper to width: 100% it will keep all containers in place and animations will not look so weird:
The multi filter is still giving me a bit of a headache though. It likes to disapear after I click a checkbox for example.
@Daan_van_Hal, you added all possible filtering methods to one page, there might be some conflicts between them, I am afraid.
Would you consider experimenting with them on separate pages and see if you will get a better results?
Thank you @sabanna for your amazing tutorial.
I too am working on a project where I need to filter more than 100 items (which is the collection list limit). I tried putting 3 lists on the same page and with the same structure but mixitup only puts an ID on the first collection list it sees and therefore only filters the firstā¦
How would you recommend doing this ? Have you tried the pagination from mixitup in combination with multidimensional filters?
Ok so the .container doesnāt need to be the collection list. You can make it a div and add several collection lists inside where the items are the .mix elements. Seems to work !
Thank you so much for putting this together. I was able to get this working at the basic level, but am having some visual errors when elements resize after filtering, with a āsnappingā to size when resizing to fit the container.
It happens because of the flex settings that you have on those elements. After Plugin re-arranges them, flex-grow CSS property make elements take all available space.
Unfortunately, it looks like there is no way to animate the size change with the plugin.
I found in the MixitUp documentation how you can control transition the height and width of target elements as they change throughout the course of an animation.
You will have to add a special āoperatorā in the plugin call:
Note: This feature requires additional calculations and manipulation to non-hardware-accelerated properties which may adversely affect performance on slower devices, and is therefore disabled by default.
Hi All. I have gone through the tutorial a few times now and I canāt seem to get the filter to actually select anything. When I select the categories I am hoping to filter it just animates to an empty collection. I get that for each of my categories. BFDIO . Any help would be greatly appreciated.
You forgot to set value to āAllā checkbox. It should be equal string all. It causing the error during the code execution.
Categories as classes should be applied to Collection item (.mix).
In your case category sits inside one more element that is inside the Collection item.
Count it like 2 levels deep inside the Collection item. That means that code snippet that is responsible for the converting categories to classes need some adjustments:
Each level of ādeepnessā require one .parentElement parameter (which basically can be translated as āapply this to a parent elementā)
In your case it would require one more, so that line of code would look like this: elem.parentElement.parentElement.classList.add(className);
Please, apply these changes and re-publish the site. Let me know if it will solve the problem.
Following our last conversation, Iāve done some modifications to my project website.
You told me previously:
"Each level of ādeepnessā require one .parentElement parameter (which basically can be translated as āapply this to a parent elementā)
In your case it would require one more, so that line of code would look like this: elem.parentElement.parentElement.classList.add(className);"
Iāve added new element, so Iām supposed to change the code.
But to be honest Iām not sure of what Iām supposed to change. I guess itās this part:
āelem.parentElement.parentElement.classList.addā
but Iām not sure.
If you could guide me (I hope It will be the last timeā¦)