Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui-core: comboBox selected object is not highlighted in the suggestions #812

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
2 changes: 1 addition & 1 deletion ui-core/src/components/inputs/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
useCallback,
} from 'react';

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

Check warning on line 13 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 useOutsideClick from '../../../hooks/useOutsideClick';
Expand Down Expand Up @@ -188,7 +188,7 @@
key={`${getSuggestionLabel(suggestion)}-${index}`}
className={cx('suggestion-item', {
active: index === activeSuggestionIndex,
selected: value === suggestion,
selected: value && getSuggestionLabel(value) === getSuggestionLabel(suggestion),
small,
})}
onClick={() => selectSuggestion(index)}
Expand Down
Loading