diff --git a/website/src/components/SearchPage/SearchFullUI.tsx b/website/src/components/SearchPage/SearchFullUI.tsx index ca361e3c3..ae37c86a9 100644 --- a/website/src/components/SearchPage/SearchFullUI.tsx +++ b/website/src/components/SearchPage/SearchFullUI.tsx @@ -52,13 +52,22 @@ interface QueryState { [key: string]: string; } -const buildSequenceCountText = (totalSequences: number | undefined, oldCount: number | null, initialCount: number) => { +const buildSequenceCountText = ( + totalSequences: number | undefined, + oldCount: number | null, + initialCount: number, + selectedCount: number, +) => { const sequenceCount = totalSequences !== undefined ? totalSequences : oldCount !== null ? oldCount : initialCount; const formattedCount = formatNumberWithDefaultLocale(sequenceCount); const pluralSuffix = sequenceCount === 1 ? '' : 's'; - return `Search returned ${formattedCount} sequence${pluralSuffix}`; + const formattedSelectedCount = formatNumberWithDefaultLocale(selectedCount); + + const selectedSeqsText = selectedCount > 0 ? `, ${formattedSelectedCount} selected` : ''; + + return `Search returned ${formattedCount} sequence${pluralSuffix}${selectedSeqsText}`; }; export const InnerSearchFullUI = ({ @@ -315,8 +324,7 @@ export const InnerSearchFullUI = ({ >