First and max need to requery (#2450)
This commit is contained in:
parent
c20c57f8aa
commit
6a07c091b7
4 changed files with 9 additions and 9 deletions
|
@ -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(
|
||||
|
|
|
@ -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 = ({
|
||||
|
|
|
@ -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 }) => (
|
||||
|
|
|
@ -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 = ({
|
||||
|
|
Loading…
Reference in a new issue