Skip to content

Commit

Permalink
feat(query-preview): update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
herrardo committed Sep 25, 2023
1 parent d084bc9 commit 080b3da
Showing 1 changed file with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,15 @@
feature: this.queryFeature,
location: this.location
});
const filters = this.queryPreviewInfo.filters?.reduce(
(filtersList, filterId) => {
const facetId = filterId.split(':')[0];
const rawFilter = createRawFilter(filterId);
filtersList[facetId] = filtersList[facetId]
? filtersList[facetId].concat(rawFilter)
: [rawFilter];
return filtersList;
},
{} as Record<string, Filter[]>
);
const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {
const facetId = filterId.split(':')[0];
const rawFilter = createRawFilter(filterId);
filtersList[facetId] = filtersList[facetId]
? filtersList[facetId].concat(rawFilter)
: [rawFilter];
return filtersList;
}, {} as Record<string, Filter[]>);
return {
query: this.queryPreviewInfo.query,
Expand Down Expand Up @@ -316,7 +313,7 @@ results.
},
data() {
return {
queryPreviewInfo: { query: 'sandals' }
queryPreviewInfo: { query: 'sandals', title: 'This is a title for the query sandals' }
};
}
};
Expand Down Expand Up @@ -367,7 +364,7 @@ In this example, the results will be rendered inside a sliding panel.
},
data() {
return {
queryPreviewInfo: { query: 'flip-flops' }
queryPreviewInfo: { query: 'flip-flops', title: 'This is a title for the query flip flops' }
};
}
};
Expand Down Expand Up @@ -398,7 +395,10 @@ In this example, the ID of the results will be rendered along with the name.
},
data() {
return {
queryPreviewInfo: { query: 'flip-flops' }
queryPreviewInfo: {
query: 'flips-flops',
title: 'This is a title for the query flip flops'
}
};
}
};
Expand Down Expand Up @@ -439,7 +439,10 @@ In this example, the query preview has been limited to render a maximum of 4 res
data() {
return {
maxItemsToRender: 4,
queryPreviewInfo: { query: 'flip-flops' }
queryPreviewInfo: {
query: 'flips-flops',
title: 'This is a title for the query flip flops'
}
};
}
};
Expand Down

0 comments on commit 080b3da

Please sign in to comment.