Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ui-core/src/components/inputs/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
useState,
} from 'react';

import { ChevronDown, X } from '@osrd-project/ui-icons';

Check warning on line 12 in ui-core/src/components/inputs/ComboBox/ComboBox.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '@osrd-project/ui-icons'
import cx from 'classnames';

import { normalizeString } from './utils';
Expand Down Expand Up @@ -198,8 +198,7 @@
} else if (!isInputInSuggestions && selectedOption) {
setInputValue(getSuggestionLabel(selectedOption));
} else if (!isInputInSuggestions) {
setInputValue('');
setSelectedOption(null);
clearInput();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clearInput() will focusInput() at the end. This is confusing for users: they've navigated away from the input (either by clicking outside, or with Tab, or something else), but then focus is set back to the input.

}

setFilteredSuggestions([]);
Expand Down
Loading