diff --git a/.gitignore b/.gitignore index 2e42dbc..2da150d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /lib *.tgz /LICENSES +.tool-versions \ No newline at end of file diff --git a/src/components/search-bar.test.tsx b/src/components/search-bar.test.tsx index f11c31b..224201f 100644 --- a/src/components/search-bar.test.tsx +++ b/src/components/search-bar.test.tsx @@ -70,7 +70,7 @@ describe('Search bar', () => { ).toBeVisible(); }); - it.each(['[Enter]', ',', '[Space]'])( + it.each(['[Enter]', ','])( 'should enable the search button when the user presses keyboard key (%s) to add the chips', async (key) => { const { user } = setup(); @@ -372,7 +372,7 @@ describe('Search bar', () => { screen.getByRole('textbox', { name: `Search in ${app1SearchView.label}` }), 'key1' ); - await user.type(screen.getByRole('textbox'), ' '); + await user.type(screen.getByRole('textbox'), ','); expect(localStorageStore[LOCAL_STORAGE_SEARCH_KEY]).toContainEqual({ value: 'key1', label: 'key1', diff --git a/src/components/search-bar.tsx b/src/components/search-bar.tsx index 06cda00..9394da0 100644 --- a/src/components/search-bar.tsx +++ b/src/components/search-bar.tsx @@ -271,7 +271,7 @@ export const SearchBar = (): React.JSX.Element => { const placeholder = useMemo( () => inputHasFocus && currentSearchModuleRoute - ? t('search.active_input_label', 'Separate your keywords by a comma or pressing TAB') + ? t('search.active_input_label', 'Separate your keywords by a comma') : t('search.idle_input_label', 'Search in {{module}}', { module: moduleLabel }), @@ -374,8 +374,7 @@ export const SearchBar = (): React.JSX.Element => { confirmChipOnBlur={false} separators={[ { key: 'Enter', ctrlKey: false }, - { key: ',', ctrlKey: false }, - { key: ' ', ctrlKey: false } + { key: ',', ctrlKey: false } ]} background={searchDisabled ? 'gray5' : 'gray6'} onChange={onQueryChange}