Skip to content

Commit

Permalink
Merge pull request #39 from whitespace-se/feat/client-config-filter
Browse files Browse the repository at this point in the history
feat: Add `AlgoliaIndex/ClientConfig` filter
  • Loading branch information
sebastianthulin authored May 17, 2024
2 parents 8cdf3f6 + 117066b commit 3d655ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/js/algolia-index-js-searchpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ document.addEventListener('DOMContentLoaded', function() {
const searchClient = algoliasearch(
algoliaSearchData.applicationId,
algoliaSearchData.publicApiKey,
{...algoliaSearchData.clientConfig}
);

const search = instantsearch({
Expand Down
1 change: 1 addition & 0 deletions source/php/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function enqueueScripts()
'applicationId' => \AlgoliaIndex\Helper\Options::applicationId(),
'indexName' => \AlgoliaIndex\Helper\Options::indexName(),
'searchQuery' => get_search_query(),
'clientConfig' => apply_filters('AlgoliaIndex/ClientConfig', []),
]);

//UI settings
Expand Down

0 comments on commit 3d655ab

Please sign in to comment.