Skip to content

Commit

Permalink
fix(ui): show formatted total result count in Search (#9356)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav2733 committed Nov 30, 2023
1 parent 65d5034 commit ae1169d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion datahub-web-react/src/app/search/SearchResults.tsx
Expand Up @@ -28,6 +28,7 @@ import SearchSortSelect from './sorting/SearchSortSelect';
import { combineSiblingsInSearchResults } from './utils/combineSiblingsInSearchResults';
import SearchQuerySuggester from './suggestions/SearchQuerySugggester';
import { ANTD_GRAY_V2 } from '../entity/shared/constants';
import { formatNumberWithoutAbbreviation } from '../shared/formatNumber';

const SearchResultsWrapper = styled.div<{ v2Styles: boolean }>`
display: flex;
Expand Down Expand Up @@ -210,7 +211,13 @@ export const SearchResults = ({
<b>
{lastResultIndex > 0 ? (page - 1) * pageSize + 1 : 0} - {lastResultIndex}
</b>{' '}
of <b>{totalResults}</b> results
of{' '}
<b>
{totalResults >= 10000
? `${formatNumberWithoutAbbreviation(10000)}+`
: formatNumberWithoutAbbreviation(totalResults)}
</b>{' '}
results
</Typography.Text>
</LeftControlsContainer>
<SearchMenuContainer>
Expand Down

0 comments on commit ae1169d

Please sign in to comment.