Skip to content

Commit 98d927b

Browse files
author
Artem
committed
#RI-5003 show scan more always when next cursor is non-zero
1 parent fa554d8 commit 98d927b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

redisinsight/ui/src/components/keys-summary/KeysSummary.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ const KeysSummary = (props: Props) => {
3535

3636
const resultsLength = items.length
3737
const scannedDisplay = resultsLength > scanned ? resultsLength : scanned
38+
const notAccurateScanned = totalItemsCount
39+
&& scanned >= totalItemsCount
40+
&& nextCursor
41+
&& nextCursor !== '0'
42+
? '~' : ''
3843

3944
return (
4045
<>
@@ -51,7 +56,7 @@ const KeysSummary = (props: Props) => {
5156
</b>
5257
<EuiTextColor color="subdued">
5358
{'Scanned '}
54-
<span data-testid="keys-number-of-scanned">{numberWithSpaces(scannedDisplay)}</span>
59+
<span data-testid="keys-number-of-scanned">{notAccurateScanned}{numberWithSpaces(scannedDisplay)}</span>
5560
{' / '}
5661
<span data-testid="keys-total">{nullableNumberWithSpaces(totalItemsCount)}</span>
5762
<span

redisinsight/ui/src/components/scan-more/ScanMore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ScanMore = ({
3131
nextCursor,
3232
}: Props) => (
3333
<>
34-
{((scanned < totalItemsCount || isNull(totalItemsCount)))
34+
{((scanned || isNull(totalItemsCount)))
3535
&& nextCursor !== '0'
3636
&& (
3737
<EuiButton

0 commit comments

Comments
 (0)