Skip to content

Commit 644142b

Browse files
kidonngulivz
authored andcommitted
feat(theme-default): use router for Algolia search to reach no refresh (#1706)
1 parent abad4c5 commit 644142b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export default {
3535
// #697 Make docsearch work well at i18n mode.
3636
algoliaOptions: Object.assign({
3737
'facetFilters': [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
38-
}, algoliaOptions)
38+
}, algoliaOptions),
39+
handleSelected: (input, event, suggestion) => {
40+
this.$router.push(new URL(suggestion.url).pathname)
41+
}
3942
}
4043
))
4144
})

0 commit comments

Comments
 (0)