Skip to content

Commit

Permalink
feat: make composition compatible with vue (#6458)
Browse files Browse the repository at this point in the history
* feat: make vue compatible with composition

* chore: increase vue2 package size 🤏

* chore(lint): allow console.error

* feedback: do not add warning
  • Loading branch information
e-krebs authored Dec 4, 2024
1 parent 16a5de8 commit a09c561
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundlesize.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion packages/vue-instantsearch/src/components/InstantSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export default createInstantSearchComponent({
},
indexName: {
type: String,
required: true,
required: false,
},
compositionID: {
type: String,
required: false,
},
routing: {
default: undefined,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a09c561

Please sign in to comment.