Empty states won't show up in webflow Answered
anyone know why empty states won't show up in webflow when using this memberscript to filter content? (https://filtering-deleting-collection-items.webflow.io/). i've spent a few hours on it and 1) the empty states successfully show up when there are no items in the cms collection, but 2) when there are items in the collection but they are all are filtered out by the script the empty state doesn't show up. I tried re-naming the empty state class to "empty-state" too but no avail. appreciate any help or ideas!
Comments
3 comments
The empty state is triggered by Webflow when the list is empty - since this is client-side filtering, webflow has no actual idea that this is empty, and therefore does not show the list.
You should be able to slightly customize this script here to make it work and trigger an empty state! This one basically does the reverse, so you would just need to set it to show an element instead of hiding it.
https://www.memberstack.com/scripts/hide-element-based-on-other-elements-children
ahhhh, makes sense. i'll give this a try tomorrow. thank you!!
No problem!!
Please sign in to leave a comment.