Skip to content

Commit 792e313

Browse files
andrelillvedebidoubiwa
authored andcommitted
Added filters to transform (#71)
1 parent 34fa6f8 commit 792e313

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@ export default function instantMeiliSearch(hostUrl, apiKey, options = {}) {
1313
const limit = this.pagination // if pagination widget is set, use paginationTotalHits as limit
1414
? this.paginationTotalHits
1515
: this.hitsPerPage
16-
const { query, facets, facetFilters, attributesToSnippet } = params
16+
const {
17+
query,
18+
facets,
19+
facetFilters,
20+
attributesToSnippet,
21+
filters,
22+
} = params
1723
const searchInput = {
1824
q: this.placeholderSearch && query === '' ? null : query,
1925
facetsDistribution: facets.length ? facets : undefined,
2026
facetFilters: facetFilters,
2127
attributesToHighlight: this.attributesToHighlight,
2228
attributesToCrop: attributesToSnippet,
29+
filters,
2330
limit,
2431
}
2532
return removeUndefinedFromObject(searchInput)

0 commit comments

Comments
 (0)