add unique title to pagination controls (#17542)
fixes: keycloak/keycloak-ui#4501
This commit is contained in:
parent
4f4c850766
commit
f5ebe675a8
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ import {
|
||||||
ToolbarItem,
|
ToolbarItem,
|
||||||
} from "@patternfly/react-core";
|
} from "@patternfly/react-core";
|
||||||
import { PropsWithChildren, ReactNode } from "react";
|
import { PropsWithChildren, ReactNode } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { TableToolbar } from "./TableToolbar";
|
import { TableToolbar } from "./TableToolbar";
|
||||||
|
|
||||||
|
@ -37,10 +38,14 @@ const KeycloakPagination = ({
|
||||||
onPreviousClick,
|
onPreviousClick,
|
||||||
onPerPageSelect,
|
onPerPageSelect,
|
||||||
}: KeycloakPaginationProps) => {
|
}: KeycloakPaginationProps) => {
|
||||||
|
const { t } = useTranslation("user-federation");
|
||||||
const page = Math.round(first / max);
|
const page = Math.round(first / max);
|
||||||
return (
|
return (
|
||||||
<Pagination
|
<Pagination
|
||||||
widgetId={id}
|
widgetId={id}
|
||||||
|
titles={{
|
||||||
|
paginationTitle: `${t("pagination")} ${variant} `,
|
||||||
|
}}
|
||||||
isCompact
|
isCompact
|
||||||
toggleTemplate={({ firstIndex, lastIndex }: ToggleTemplateProps) => (
|
toggleTemplate={({ firstIndex, lastIndex }: ToggleTemplateProps) => (
|
||||||
<b>
|
<b>
|
||||||
|
|
Loading…
Reference in a new issue