diff --git a/src/__tests__/styled.test.tsx b/src/__tests__/styled.test.tsx index d6a1e82..5f2205f 100644 --- a/src/__tests__/styled.test.tsx +++ b/src/__tests__/styled.test.tsx @@ -17,6 +17,11 @@ describe('Search Suggestion Styles', () => { width: 100%; } + .emotion-0 mark { + display: inline; + padding: 0; + } + .emotion-0 ul { position: absolute; top: 100%; @@ -36,7 +41,6 @@ describe('Search Suggestion Styles', () => { .emotion-0 ul li>*:focus { border: 0; box-shadow: 0; - font-weight: bold; outline: 0; } @@ -62,6 +66,11 @@ describe('Search Suggestion Styles', () => { width: 100%; } + .emotion-0 mark { + display: inline; + padding: 0; + } + .emotion-0 ul { position: absolute; top: 100%; @@ -81,7 +90,6 @@ describe('Search Suggestion Styles', () => { .emotion-0 ul li>*:focus { border: 0; box-shadow: 0; - font-weight: bold; outline: 0; } diff --git a/src/useSuggestions.ts b/src/useSuggestions.ts index 99822e8..3953909 100644 --- a/src/useSuggestions.ts +++ b/src/useSuggestions.ts @@ -23,7 +23,7 @@ export const useSuggestions = ( // eslint-disable-next-line no-param-reassign ;(el.firstChild as HTMLElement).tabIndex = -1 }) - }) + }, [searchSuggestionsRef.current]) const selectElement = (type: ResultType) => { ;(