Skip to content

Commit abd2ca4

Browse files
Merge #1145
1145: Fix getting started documentation of autocomplete client r=bidoubiwa a=bidoubiwa The autocomplete getting started guide incorrectly instantiated the autocomplete client. It should be ``` const searchClient = meilisearchAutocompleteClient({ url: 'https://ms-adf78ae33284-106.lon.meilisearch.io', // Host apiKey: 'a63da4928426f12639e19d62886f621130f3fa9ff3c7534c5d179f0f51c4f303' // API key }) ``` and not ``` const searchClient = meilisearchAutocompleteClient( 'https://ms-adf78ae33284-106.lon.meilisearch.io', // Host 'a63da4928426f12639e19d62886f621130f3fa9ff3c7534c5d179f0f51c4f303' // API key ) ``` Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents 41a75d1 + 753e9ba commit abd2ca4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.changeset/curvy-parrots-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@meilisearch/autocomplete-client": patch
3+
---
4+
5+
Fix the getting started wrongly instanciating the autocomplete client

packages/autocomplete-client/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ import {
8383
} from '@meilisearch/autocomplete-client'
8484
import '@algolia/autocomplete-theme-classic'
8585

86-
const searchClient = meilisearchAutocompleteClient(
87-
'https://ms-adf78ae33284-106.lon.meilisearch.io', // Host
88-
'a63da4928426f12639e19d62886f621130f3fa9ff3c7534c5d179f0f51c4f303' // API key
89-
)
86+
const searchClient = meilisearchAutocompleteClient({
87+
url: 'https://ms-adf78ae33284-106.lon.meilisearch.io', // Host
88+
apiKey: 'a63da4928426f12639e19d62886f621130f3fa9ff3c7534c5d179f0f51c4f303' // API key
89+
})
9090

9191
autocomplete({
9292
container: '#autocomplete',
@@ -110,7 +110,6 @@ autocomplete({
110110
item({ item, components, html }) {
111111
return html`<div>
112112
<div>${item.name}</div>
113-
<div>${item.description}</div>
114113
</div>`
115114
},
116115
},

0 commit comments

Comments
 (0)