Skip to content

Commit

Permalink
fix(TablePaginationControls): Hide total pages text when page input i…
Browse files Browse the repository at this point in the history
…s hidden (#1158)
  • Loading branch information
fasih-mehmood authored Nov 1, 2024
1 parent 3a66137 commit a853161
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ describe("<TablePaginationControls />", () => {
expect(
screen.queryByRole("spinbutton", { name: Label.PAGE_NUMBER }),
).not.toBeInTheDocument();
expect(screen.queryByText("of 5")).not.toBeInTheDocument();
});

it("can display the description", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ const TablePaginationControls = ({
value={currentPage}
type="number"
/>{" "}
{typeof totalPages === "number" ? `of ${totalPages}` : null}
</>
) : null}
{typeof totalPages === "number" ? `of ${totalPages}` : null}
<Button
aria-label={Label.NEXT_PAGE}
className="next"
Expand Down

0 comments on commit a853161

Please sign in to comment.