First and max need to requery (#2450)

This commit is contained in:
Erik Jan de Wit 2022-04-21 16:53:30 +02:00 committed by GitHub
parent c20c57f8aa
commit 6a07c091b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -37,9 +37,9 @@ import { EmptyPermissionsState } from "./EmptyPermissionsState";
import { toNewPermission } from "../routes/NewPermission";
import { toPermissionDetails } from "../routes/PermissionDetails";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { toPolicyDetails } from "../routes/PolicyDetails";
import "./permissions.css";
import { toPolicyDetails } from "../routes/PolicyDetails";
type PermissionsProps = {
clientId: string;
@ -93,7 +93,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
async () => {
const permissions = await adminClient.clients.findPermissions({
first,
max,
max: max + 1,
id: clientId,
...search,
});
@ -115,7 +115,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
);
},
setPermissions,
[key, search]
[key, search, first, max]
);
useFetch(

View file

@ -72,7 +72,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
async () => {
const policies = await adminClient.clients.listPolicies({
first,
max,
max: max + 1,
id: clientId,
permission: "false",
...search,
@ -101,7 +101,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
);
setPolicies(policies);
},
[key, search]
[key, search, first, max]
);
const DependentPoliciesRenderer = ({

View file

@ -66,7 +66,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
() => {
const params = {
first,
max,
max: max + 1,
deep: false,
...search,
};
@ -79,7 +79,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
setResources(
resources.map((resource) => ({ ...resource, isExpanded: false }))
),
[key, search]
[key, search, first, max]
);
const UriRenderer = ({ row }: { row: ResourceRepresentation }) => (

View file

@ -66,7 +66,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
async () => {
const params = {
first,
max,
max: max + 1,
deep: false,
name: search,
};
@ -93,7 +93,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
);
},
setScopes,
[key, search]
[key, search, first, max]
);
const ResourceRenderer = ({