From bbb2eaabbded411baa1d9c061f28fe81ed4d1d5e Mon Sep 17 00:00:00 2001 From: Felix Habib Date: Wed, 28 Aug 2024 14:17:14 +1000 Subject: [PATCH] Console log --- .../src/lib/components/Autosuggest/Autosuggest.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/braid-design-system/src/lib/components/Autosuggest/Autosuggest.tsx b/packages/braid-design-system/src/lib/components/Autosuggest/Autosuggest.tsx index 8411a6f8279..23cb9413f01 100644 --- a/packages/braid-design-system/src/lib/components/Autosuggest/Autosuggest.tsx +++ b/packages/braid-design-system/src/lib/components/Autosuggest/Autosuggest.tsx @@ -842,9 +842,21 @@ export const Autosuggest = forwardRef(function ( const { text } = suggestion; const groupHeading = groupHeadingIndexes.get(index); const highlights = suggestionHighlight - ? [{ start: 0, end: suggestion.text.length }] + ? highlightSuggestions( + suggestion.text, + value.text, + suggestionHighlight, + ) : suggestion.highlights; + console.log( + highlightSuggestions( + suggestion.text, + value.text, + suggestionHighlight, + ), + ); + return ( {groupHeading ? (