Skip to content

Commit b274e73

Browse files
fix(metadata-view): Use internal pagination (#4263)
1 parent fac795f commit b274e73

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/elements/content-explorer/ContentExplorer.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,9 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
16531653
> => {
16541654
const { metadataViewProps } = this.props;
16551655
const { onSelectionChange } = metadataViewProps ?? {};
1656-
const { selectedItemIds } = this.state;
1656+
const { currentPageNumber, markers, selectedItemIds } = this.state;
1657+
const hasNextMarker: boolean = !!markers[currentPageNumber + 1];
1658+
const hasPrevMarker: boolean = currentPageNumber === 1 || !!markers[currentPageNumber - 1];
16571659

16581660
return {
16591661
...metadataViewProps,
@@ -1666,6 +1668,12 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
16661668
...(isSelectionEmpty && { isMetadataSidePanelOpen: false }),
16671669
});
16681670
},
1671+
paginationProps: {
1672+
onMarkerBasedPageChange: this.markerBasedPaginate,
1673+
hasNextMarker,
1674+
hasPrevMarker,
1675+
type: 'marker',
1676+
},
16691677
};
16701678
};
16711679

@@ -1941,7 +1949,7 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
19411949
viewMode={viewMode}
19421950
/>
19431951

1944-
{!isErrorView && (
1952+
{!isErrorView && !isMetadataViewV2Feature && (
19451953
<Footer>
19461954
<Pagination
19471955
hasNextMarker={hasNextMarker}

0 commit comments

Comments
 (0)