This repository was archived by the owner on May 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 11<template >
2- <ais-index :searchStore =" searchStore" >
2+ <ais-index :searchStore =" searchStore" :auto-search =" false" >
3+
34 <ais-search-box placeholder =" Find products" />
4- <ul >
5+
6+ <ais-refinement-list attribute-name =" colors" ></ais-refinement-list >
7+
58 <ais-results >
69 <template scope="{ result }">
7- <li >
10+ <div >
811 <ais-highlight :result =" result" attribute-name =" name" ></ais-highlight >
9- </li >
12+ </div >
1013 </template >
1114 </ais-results >
12- </ ul >
15+
1316 </ais-index >
1417</template >
1518<script >
1619import {
1720 createFromAlgoliaCredentials ,
1821 createFromSerialized ,
22+ FACET_OR ,
1923} from ' vue-instantsearch' ;
2024
2125let store;
@@ -30,9 +34,11 @@ export default {
3034
3135 store .indexName = ' ikea' ;
3236 store .query = route .params .query ? route .params .query : ' ' ;
37+ store .addFacet (' colors' , FACET_OR );
3338 store .highlightPreTag = ' <mark>' ;
3439 store .highlightPostTag = ' </mark>' ;
3540 store .start ();
41+ store .refresh ();
3642
3743 return store .waitUntilInSync ().then (() => {
3844 context .state = {
@@ -61,9 +67,6 @@ export default {
6167 }
6268 },
6369 },
64- mounted () {
65- // this.searchStore.start();
66- },
6770 data () {
6871 return {
6972 searchStore: store,
You can’t perform that action at this time.
0 commit comments