This is an automated email from the ASF dual-hosted git repository.

arafat2198 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new d5be9866648 HDDS-13840. Reset Namespace metadata pagination when path 
changes (#9203)
d5be9866648 is described below

commit d5be9866648bf65c76e176250d9b34cbac331c84
Author: Abhishek Pal <[email protected]>
AuthorDate: Tue Oct 28 12:03:24 2025 +0530

    HDDS-13840. Reset Namespace metadata pagination when path changes (#9203)
---
 .../src/v2/components/nuMetadata/nuMetadata.tsx            | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/nuMetadata/nuMetadata.tsx
 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/nuMetadata/nuMetadata.tsx
index bcea9ab40cf..875defd912e 100644
--- 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/nuMetadata/nuMetadata.tsx
+++ 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/nuMetadata/nuMetadata.tsx
@@ -125,6 +125,7 @@ const NUMetadata: React.FC<MetadataProps> = ({
 }) => {
   const [state, setState] = useState<MetadataState>([]);
   const [isProcessingData, setIsProcessingData] = useState<boolean>(false);
+  const [pgNumber, setPgNumber] = useState<number>(1);
   // Individual API calls that resolve together
   const summaryAPI = useApiData<SummaryResponse>(
     `/api/v1/namespace/summary?path=${path}`,
@@ -359,6 +360,11 @@ const NUMetadata: React.FC<MetadataProps> = ({
     }
   }, [path, getObjectInfoMapping]);
 
+  // Reset pagination when path changes
+  useEffect(() => {
+    setPgNumber(1);
+  }, [path]);
+
   // Coordinate API calls - process data when both calls complete
   useEffect(() => {
     if (!summaryAPI.loading && !quotaAPI.loading && 
@@ -369,12 +375,20 @@ const NUMetadata: React.FC<MetadataProps> = ({
   }, [summaryAPI.loading, quotaAPI.loading, summaryAPI.data, quotaAPI.data, 
       summaryAPI.lastUpdated, quotaAPI.lastUpdated, processMetadata]);
 
+  const handleTableChange = (newPagination: any) => {
+    setPgNumber(newPagination.current);
+  };
+
   return (
     <Table
       size='small'
       loading={loading}
       dataSource={state}
       bordered={true}
+      pagination={{
+        current: pgNumber
+      }}
+      onChange={handleTableChange}
       style={{
         flex: '0 1 45%',
         margin: '10px auto'


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

Reply via email to