NO BUG: Query filters interactions not work as expected in search-filter element

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: my page link

Hello bricks team,

I have created an interaction on the element like a button so that if the user’s search in the search-filter element does not return any results, the element will be hidden.
But the problem is that if the user searches for a term that doesn’t return any results, the interaction doesn’t work. I have added the link to the page at the beginning of this topic.

I even tried to do this using the condition {query_results_count_filter:id} but it doesn’t work at all.

{"content":[{"id":"tgqshk","name":"section","parent":0,"children":["zpvyrx"],"settings":{}},{"id":"zpvyrx","name":"container","parent":"tgqshk","children":["jrsubg","fpyqnq","kzjkzl"],"settings":{"_rowGap":"20"}},{"id":"jrsubg","name":"button","parent":"zpvyrx","children":[],"settings":{"text":"I am a button","style":"primary","_interactions":[{"id":"ueaikt","trigger":"filterOptionEmpty","filterElementId":"fpyqnq","action":"hide"},{"id":"zkypoc","trigger":"filterOptionNotEmpty","filterElementId":"fpyqnq","action":"show"}]}},{"id":"fpyqnq","name":"filter-search","parent":"zpvyrx","children":[],"settings":{"filterQueryId":"rejjco"},"themeStyles":[]},{"id":"kzjkzl","name":"block","parent":"zpvyrx","children":["rejjco"],"settings":{"query":{"post_type":["product"]},"_rowGap":"10"}},{"id":"rejjco","name":"block","parent":"kzjkzl","children":["plihof"],"settings":{"hasLoop":true}},{"id":"plihof","name":"heading","parent":"rejjco","children":[],"settings":{"text":"{post_title}"}}],"source":"bricksCopiedElements","sourceUrl":"https://try.bricksbuilder.io/t8f1f855","version":"1.12.3","globalClasses":[],"globalElements":[]}

Thank you

Hi, just a reminder to check this report.

Hi @jolia ,

Kindly check this.

These 2 interactions are meant to check the filter element instead of the target query.

There is no interaction available to check if the Target query result count is empty or not.

Regards,
Jenn

1 Like