Discussions

Ask a Question
Back to All

How to Filter by Multiple Values

In the default Classifieds example, we're able to filter the list by the ".title" field. How can we filter by multiple fields? For example, how can we filter by title AND description?

Admin
Admin

Hi,

On the input tag for the text search, the data-path specify the elements selector class to use for search.
Actually it is ".title".
If you specify on the summary div the title class, it will also search on the summary.

/OpenContent/Templates/Classifieds/item.hbs

{{Summary}}

Thanks, Sacha. I ended up putting all of the searchable values in the same DIV, and hiding the content that shouldn't show in that area using the Bootstrap class to hide content (d-none). This did the trick! :)

ο»Ώ