diff --git a/src/components/TablePagination/TablePaginationControls/TablePaginationControls.tsx b/src/components/TablePagination/TablePaginationControls/TablePaginationControls.tsx index 4716f09e6..5b129dfaf 100644 --- a/src/components/TablePagination/TablePaginationControls/TablePaginationControls.tsx +++ b/src/components/TablePagination/TablePaginationControls/TablePaginationControls.tsx @@ -2,7 +2,7 @@ import Button from "components/Button"; import Icon from "components/Icon"; import Input from "components/Input"; import Select from "components/Select"; -import React, { ChangeEvent, HTMLAttributes, useRef } from "react"; +import React, { ChangeEvent, HTMLAttributes } from "react"; import classnames from "classnames"; import { generatePagingOptions, @@ -38,8 +38,7 @@ const TablePaginationControls = ({ onPageSizeChange, ...divProps }: Props): JSX.Element => { - const descriptionRef = useRef(null); - const isSmallScreen = useFigureSmallScreen({ descriptionRef }); + const isSmallScreen = useFigureSmallScreen(); const totalPages = Math.ceil(totalItems / pageSize); const descriptionDisplay = getDescription({ @@ -77,7 +76,7 @@ const TablePaginationControls = ({ {...divProps} role="navigation" > -
+
{descriptionDisplay}