Skip to content
Open
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
11 changes: 8 additions & 3 deletions src/components/appHosted/AppHostedLanguageGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@ export const AppHostedLanguageGroup: React.FunctionComponent = () => {
getItemProps: (options: GetItemPropsOptions<any>) => {},
getMenuProps: (options: GetMenuPropsOptions) => {}
) => {
languagesToDisplay = getLanguagesMatchingSearchTerm(searchTerm).filter(
(lang) => preferredLangCodes.indexOf(lang.isoCode) < 0
);
const matchingLanguages = getLanguagesMatchingSearchTerm(searchTerm);
// Filter out favorites from the main list so we don't show the same language twice.
// But show them when favorites are hidden; else they won't show at all. BL-15822
languagesToDisplay = !showPreferredLangs
? matchingLanguages
: matchingLanguages.filter(
(lang) => !preferredLangCodes.includes(lang.isoCode)
);
const prefColor = commonUI.colors.bloomRed;
// if (!showAll && languagesToDisplay.length > 10) {
// languagesToDisplay.splice(10);
Expand Down