CMS Library Filter by Class

Hi (-: I followed this Finsweet tutorial https://cmsdocs-howto.webflow.io/filter/example9. It shows how to filter by one class in a CMS Collection Lists item. This is where I got the custom code from: https://cmsdocs.webflow.io/filter. However the dynamic filters stop working, whenever I add the function filterByClass to the custom code. On my page I want the ‘filter-buttons’ to only filter the class ‘states-text’ in the CMS item, currently its filtering the whole CMS content.

If anyone could help it would be really appreciated.

Here is my read-only link: https://preview.webflow.com/preview/forumfuerfragen?utm_medium=preview_link&utm_source=designer&utm_content=forumfuerfragen&preview=1e39a4f93fcf09122dcd1a9c98dee635&pageId=5fa26059ff9a872c3e27b3d7&mode=preview

Finsweet offers free support to users, when using their products, at https://www.sweetjs.io

Screenshot 2020-11-14 at 17.54.11

Thanks for your advice, they solved the issue.