smitajoshi12 commented on code in PR #5658:
URL: https://github.com/apache/ozone/pull/5658#discussion_r1463411285


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -502,13 +512,14 @@ export class Om extends React.Component<Record<string, 
object>, IOmdbInsightsSta
         })
       }
       else {
-        if (this.state.prevKeyMismatch === 0 ){
+        if (this.state.prevKeyMismatch === 0 || this.state.pageDisplayCount 
=== 1){
           this.setState({
             prevClickable: false
           })
         }
-        if 
(mismatchPrevKeyList.includes(mismatchContainersResponse.data.lastKey) === 
false) {
-          mismatchPrevKeyList.push(mismatchContainersResponse.data.lastKey);
+        //Need to avoid rewrite in Map so avoiding duplication and wrong value 
for
+        if (!prevKeyListMap.has(this.state.pageDisplayCount)) {

Review Comment:
   When we change Page SIze each time we get different last keys depending upon 
page size so need to avoid rewrire of keys so used logic. If we changes Page 
size from 10 to 20 we get different lastkey=20 if we change pagesize=30 we get 
different last key.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to