Always show the pagination toolbar (#4053)
This commit is contained in:
parent
e0246c70d4
commit
5a5426195b
2 changed files with 16 additions and 9 deletions
|
@ -99,17 +99,17 @@ describe("Client Scopes test", () => {
|
|||
.itemExist(FilterAssignedType.None, false);
|
||||
});
|
||||
|
||||
//TODO https://github.com/keycloak/keycloak-admin-ui/issues/1959
|
||||
it("should filter items by Protocol All", () => {
|
||||
listingPage
|
||||
.selectFilter(Filter.Protocol)
|
||||
.selectSecondaryFilterProtocol(FilterProtocol.All)
|
||||
.selectSecondaryFilterProtocol(FilterProtocol.All);
|
||||
sidebarPage.waitForPageLoad();
|
||||
listingPage
|
||||
.showNextPageTableItems()
|
||||
.itemExist(FilterProtocol.SAML, true)
|
||||
.itemExist(openIDConnectItemText, true); //using FilterProtocol.OpenID will fail, text does not match.
|
||||
});
|
||||
|
||||
//TODO https://github.com/keycloak/keycloak-admin-ui/issues/1959
|
||||
it("should filter items by Protocol SAML", () => {
|
||||
listingPage
|
||||
.selectFilter(Filter.Protocol)
|
||||
|
@ -118,7 +118,6 @@ describe("Client Scopes test", () => {
|
|||
.itemExist(openIDConnectItemText, false); //using FilterProtocol.OpenID will fail, text does not match.
|
||||
});
|
||||
|
||||
//TODO https://github.com/keycloak/keycloak-admin-ui/issues/1959
|
||||
it("should filter items by Protocol OpenID", () => {
|
||||
listingPage
|
||||
.selectFilter(Filter.Protocol)
|
||||
|
|
|
@ -37,7 +37,11 @@ export const PaginatingTableToolbar: FunctionComponent<TableToolbarProps> = ({
|
|||
inputGroupOnEnter,
|
||||
}) => {
|
||||
const page = Math.round(first / max);
|
||||
const pagination = (variant: "top" | "bottom" = "top") => (
|
||||
const KeycloakPagination = ({
|
||||
variant = "top",
|
||||
}: {
|
||||
variant?: "top" | "bottom";
|
||||
}) => (
|
||||
<Pagination
|
||||
isCompact
|
||||
toggleTemplate={({ firstIndex, lastIndex }: ToggleTemplateProps) => (
|
||||
|
@ -61,14 +65,18 @@ export const PaginatingTableToolbar: FunctionComponent<TableToolbarProps> = ({
|
|||
toolbarItem={
|
||||
<>
|
||||
{toolbarItem}
|
||||
{count !== 0 && (
|
||||
<ToolbarItem variant="pagination">{pagination()}</ToolbarItem>
|
||||
)}
|
||||
<ToolbarItem variant="pagination">
|
||||
<KeycloakPagination />
|
||||
</ToolbarItem>
|
||||
</>
|
||||
}
|
||||
subToolbar={subToolbar}
|
||||
toolbarItemFooter={
|
||||
count !== 0 ? <ToolbarItem>{pagination("bottom")}</ToolbarItem> : null
|
||||
count !== 0 ? (
|
||||
<ToolbarItem>
|
||||
<KeycloakPagination variant="bottom" />
|
||||
</ToolbarItem>
|
||||
) : null
|
||||
}
|
||||
inputGroupName={inputGroupName}
|
||||
inputGroupPlaceholder={inputGroupPlaceholder}
|
||||
|
|
Loading…
Reference in a new issue