diff --git a/bundlesize.config.json b/bundlesize.config.json index 862ad8b91d..52a70b56a6 100644 --- a/bundlesize.config.json +++ b/bundlesize.config.json @@ -34,7 +34,7 @@ }, { "path": "packages/vue-instantsearch/vue2/cjs/index.js", - "maxSize": "20.25 kB" + "maxSize": "20.50 kB" }, { "path": "packages/vue-instantsearch/vue3/cjs/index.js", diff --git a/packages/vue-instantsearch/src/components/InstantSearch.js b/packages/vue-instantsearch/src/components/InstantSearch.js index 8c733558c0..ad7ec32afa 100644 --- a/packages/vue-instantsearch/src/components/InstantSearch.js +++ b/packages/vue-instantsearch/src/components/InstantSearch.js @@ -22,7 +22,11 @@ export default createInstantSearchComponent({ }, indexName: { type: String, - required: true, + required: false, + }, + compositionID: { + type: String, + required: false, }, routing: { default: undefined, @@ -101,6 +105,7 @@ export default createInstantSearchComponent({ insightsClient: this.insightsClient, insights: this.insights, indexName: this.indexName, + compositionID: this.compositionID, routing: this.routing, stalledSearchDelay: this.stalledSearchDelay, searchFunction: this.searchFunction, diff --git a/packages/vue-instantsearch/src/util/createInstantSearchComponent.js b/packages/vue-instantsearch/src/util/createInstantSearchComponent.js index c172ceb326..5709f1e1dc 100644 --- a/packages/vue-instantsearch/src/util/createInstantSearchComponent.js +++ b/packages/vue-instantsearch/src/util/createInstantSearchComponent.js @@ -28,6 +28,11 @@ export const createInstantSearchComponent = (component) => indexName(indexName) { this.instantSearchInstance.helper.setIndex(indexName || '').search(); }, + compositionID(compositionID) { + this.instantSearchInstance.helper + .setIndex(compositionID || '') + .search(); + }, stalledSearchDelay(stalledSearchDelay) { // private InstantSearch.js API: this.instantSearchInstance._stalledSearchDelay = stalledSearchDelay;