Skip to content
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
13 changes: 10 additions & 3 deletions src/components/appHosted/AppHostedLanguageGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,16 @@ 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);
languagesToDisplay = matchingLanguages;
if (showPreferredLangs) {
// Filter out favorites from the main list so we don't show the same language twice.
// Note: it is important not to do this when favorites are hidden; else they won't show at all. BL-15822
languagesToDisplay = matchingLanguages.filter(
(lang) => !preferredLangCodes.includes(lang.isoCode)
);
}

const prefColor = commonUI.colors.bloomRed;
// if (!showAll && languagesToDisplay.length > 10) {
// languagesToDisplay.splice(10);
Comment thread
andrew-polk marked this conversation as resolved.
Expand Down