Realm roles: fix pagination by 10 (#367)
* fix pagination by 10 * fix types * format * format * PR feedback from Erik
This commit is contained in:
parent
689e01b461
commit
93d5d21894
2 changed files with 6 additions and 6 deletions
|
@ -6,9 +6,9 @@ import { RolesList } from "./RolesList";
|
|||
|
||||
export const RealmRolesSection = () => {
|
||||
const adminClient = useAdminClient();
|
||||
const loader = async (to?: number, max?: number, search?: string) => {
|
||||
const loader = async (first?: number, max?: number, search?: string) => {
|
||||
const params: { [name: string]: string | number } = {
|
||||
to: to!,
|
||||
first: first!,
|
||||
max: max!,
|
||||
search: search!,
|
||||
};
|
||||
|
|
|
@ -13,13 +13,13 @@ import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
|||
import { emptyFormatter, boolFormatter } from "../util";
|
||||
|
||||
type RolesListProps = {
|
||||
loader: (
|
||||
paginated?: boolean;
|
||||
parentRoleId?: string;
|
||||
loader?: (
|
||||
first?: number,
|
||||
max?: number,
|
||||
search?: string
|
||||
) => Promise<RoleRepresentation[]>;
|
||||
paginated?: boolean;
|
||||
parentRoleId?: string;
|
||||
};
|
||||
|
||||
export const RolesList = ({
|
||||
|
@ -75,7 +75,7 @@ export const RolesList = ({
|
|||
<DeleteConfirm />
|
||||
<KeycloakDataTable
|
||||
key={selectedRole ? selectedRole.id : "roleList"}
|
||||
loader={loader}
|
||||
loader={loader!}
|
||||
ariaLabelKey="roles:roleList"
|
||||
searchPlaceholderKey="roles:searchFor"
|
||||
isPaginated={paginated}
|
||||
|
|
Loading…
Reference in a new issue