- <>
- {!!autocompleteSuggestions &&
- Object.entries(autocompletedSuggestions).map(
- ([suggestionType, suggestions]) => {
- return (
-
- {getSuggestionTitle(
- suggestionType,
- autocompleteSuggestions
- ) &&
- suggestions.length > 0 && (
-
- {getSuggestionTitle(
- suggestionType,
- autocompleteSuggestions
- )}
-
- )}
- {suggestions.length > 0 && (
-
- {suggestions.map((suggestion) => {
- index++;
- return (
- -
- {suggestion.highlight ? (
-
- ) : (
- {suggestion.suggestion}
- )}
-
- );
- })}
-
- )}
-
- );
- }
- )}
- {!!autocompleteResults &&
- !!autocompletedResults &&
- typeof autocompleteResults !== "boolean" &&
- autocompletedResults.length > 0 &&
- autocompleteResults.sectionTitle && (
-
- {autocompleteResults.sectionTitle}
-
- )}
- {!!autocompleteResults &&
- !!autocompletedResults &&
- autocompletedResults.length > 0 && (
-
- {autocompletedResults.map((result) => {
- index++;
- const titleField =
- typeof autocompleteResults === "boolean"
- ? null
- : autocompleteResults.titleField;
- const titleRaw = getRaw(result, titleField);
- return (
- -
-
-
{titleRaw}
-
- );
- })}
-
- )}
- >
-
- );
- }
- ```
-