Function AutocompleteElement

  • Wraps elements to interactive component that handles selection based on provided configuration.

    Parameters

    Returns JSX.Element

    // Render product
    {products?.hits?.map(hit => <AutocompleteElement hit={hit} class="nosto-product">
    {hit.title}
    </AutocompleteElement>)}

    // Render keywords
    {keywords?.hits?.map(hit => <AutocompleteElement query={{ query: hit.keywords }} class="nosto-keyword">
    {hit.keywords}
    </AutocompleteElement>)}