nuxt-modules / algolia

🔎 Algolia module for Nuxt
https://algolia.nuxtjs.org/
MIT License
185 stars 32 forks source link

feat(docsearch): allow to set component props individually and inherit undefined ones from the config #178

Closed Lehoczky closed 9 months ago

Lehoczky commented 10 months ago

Types of changes

Description

Resolves #172

1) The <AlgoliaDocSearch /> component now accepts every configuration option as different prop instead of one options object:

<template>
  <AlgoliaDocSearch 
    applicationId="appId" 
    apiKey="key" 
    indexName="indexName" 
    placeholder="Search"
    :searchParameters="{}"
    :disableUserPersonalization="false"
    initialQuery=""
    :translations="{}"
    :transform-items=":transform-items"
    ...
  />
</template>

2) Function options has also been removed from nuxt.config.ts 3) The documentation has been updated to match the official docs 4) Several new pages have been added to the playground which showcases different usage scenarios for the <AlgoliaDocSearch /> component

[!NOTE]
I wasn't able to start the docs locally on Windows, so I made the changes there blindly. If you could confirm everything looks right, that would be wonderful.

Checklist:

nuxt-studio[bot] commented 9 months ago

Live Preview ready!

Name Edit Preview Latest Commit
Algolia Edit on Studio ↗︎ View Live Preview 2683cae30d697bdb5e6dd796d8d2deecdd9c0e23
Baroshem commented 9 months ago

Really nice work @Lehoczky Thanks for that! 💚