Browse Source

UI: change label Approx Count to Entity Count if the collection is
loaded on the overview page

Signed-off-by: ryjiang <jiangruiyi@gmail.com>

ryjiang 10 months ago
parent
commit
e732d2af93
1 changed files with 10 additions and 4 deletions
  1. 10 4
      client/src/pages/databases/collections/overview/Overview.tsx

+ 10 - 4
client/src/pages/databases/collections/overview/Overview.tsx

@@ -304,10 +304,16 @@ const Overview = () => {
 
 
           <div className={classes.block}>
           <div className={classes.block}>
             <Typography variant="h5">
             <Typography variant="h5">
-              {collectionTrans('rowCount')}
-              <CustomToolTip title={collectionTrans('entityCountInfo')}>
-                <Icons.question classes={{ root: classes.questionIcon }} />
-              </CustomToolTip>
+              {collection.loaded ? (
+                collectionTrans('count')
+              ) : (
+                <>
+                  {collectionTrans('rowCount')}
+                  <CustomToolTip title={collectionTrans('entityCountInfo')}>
+                    <Icons.question classes={{ root: classes.questionIcon }} />
+                  </CustomToolTip>
+                </>
+              )}
             </Typography>
             </Typography>
             <Typography variant="h6">{collection?.rowCount || '0'}</Typography>
             <Typography variant="h6">{collection?.rowCount || '0'}</Typography>
           </div>
           </div>