Add comment about category and amenities filters not working by default

This commit is contained in:
Vesa Luusua 2019-03-29 13:02:00 +02:00
parent 98fb5d40b2
commit 3e2569b693
2 changed files with 14 additions and 0 deletions

View file

@ -1,5 +1,14 @@
# SearchPage
> **Note:** _category_ and _amenities_ filters are not actually filtering anything by default. They
> are tied to [extended data](https://www.sharetribe.com/docs/references/extended-data/), which is
> likely to be customized in every marketplace. You can add public data to listing entity in your
> client app, but to make it work as a search filter, we need to manually add
> [a schema](https://www.sharetribe.com/docs/references/extended-data/#data-schema) for it - so that
> search engine understands what is the nature of a given data key.
## Structure
SearchPage component has roughly 3 sections inside its layout: Topbar, MainPanel (for results and
filters), and Map

View file

@ -54,6 +54,11 @@ export class SearchPageComponent extends Component {
filters() {
const { categories, amenities, priceFilterConfig, dateRangeFilterConfig } = this.props;
// Note: "category" and "amenities" filters are not actually filtering anything by default.
// Currently, if you want to use them, we need to manually configure them to be available
// for search queries. Read more from extended data document:
// https://www.sharetribe.com/docs/references/extended-data/#data-schema
return {
categoryFilter: {
paramName: 'pub_category',