Skip to content

Commit

Permalink
fix(locale): Use a customWidget to set the refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerska committed Dec 14, 2015
1 parent b5e0960 commit 328a902
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/instantsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ export default (options) => {
urlSync: {},
searchParameters: {
query: query,
attributesToSnippet: ['body_safe:60'],
facetFilters: `["locale.locale:${I18n.locale}"]`
attributesToSnippet: ['body_safe:60']
}
});

search.addWidget({
getConfiguration: () => ({facets: ['locale.locale']}),
init: ({helper}) => {
helper.toggleRefine('locale.locale', I18n.locale);
}
});

Expand Down

0 comments on commit 328a902

Please sign in to comment.