Skip to content

Commit

Permalink
fix: [UIE-8259] dbaas landing paginator disappears when pageSize is l…
Browse files Browse the repository at this point in the history
…ess than the number of instances (#11275)
  • Loading branch information
smans-akamai authored Nov 20, 2024
1 parent 7e766d5 commit 8aa1545
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11275-fixed-1731961142321.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

dbaas landing paginator disappears when pageSize is less than the number of instances ([#11275](https://github.com/linode/manager/pull/11275))
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const DatabaseLanding = () => {
<DatabaseLandingTable
data={legacyDatabases?.data}
handleOrderChange={legacyDatabaseHandleOrderChange}
results={legacyDatabases?.results}
order={legacyDatabaseOrder}
orderBy={legacyDatabaseOrderBy}
/>
Expand All @@ -156,6 +157,7 @@ const DatabaseLanding = () => {
const defaultTable = () => {
return (
<DatabaseLandingTable
results={newDatabases?.results}
data={newDatabases?.data}
handleOrderChange={newDatabaseHandleOrderChange}
isNewDatabase={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ interface Props {
order: 'asc' | 'desc';
orderBy: string;
showSuspend?: boolean;
results: number | undefined;
}
const DatabaseLandingTable = ({
data,
handleOrderChange,
isNewDatabase,
order,
orderBy,
results,
showSuspend,
}: Props) => {
const { data: events } = useInProgressEvents();
Expand Down Expand Up @@ -190,7 +192,7 @@ const DatabaseLandingTable = ({
</TableBody>
</Table>
<PaginationFooter
count={data?.length || 0}
count={results || 0}
eventCategory="Databases Table"
handlePageChange={pagination.handlePageChange}
handleSizeChange={pagination.handlePageSizeChange}
Expand Down

0 comments on commit 8aa1545

Please sign in to comment.