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 { toNewPermission } from "../routes/NewPermission";
|
||||||
import { toPermissionDetails } from "../routes/PermissionDetails";
|
import { toPermissionDetails } from "../routes/PermissionDetails";
|
||||||
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||||
|
import { toPolicyDetails } from "../routes/PolicyDetails";
|
||||||
|
|
||||||
import "./permissions.css";
|
import "./permissions.css";
|
||||||
import { toPolicyDetails } from "../routes/PolicyDetails";
|
|
||||||
|
|
||||||
type PermissionsProps = {
|
type PermissionsProps = {
|
||||||
clientId: string;
|
clientId: string;
|
||||||
|
@ -93,7 +93,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
|
||||||
async () => {
|
async () => {
|
||||||
const permissions = await adminClient.clients.findPermissions({
|
const permissions = await adminClient.clients.findPermissions({
|
||||||
first,
|
first,
|
||||||
max,
|
max: max + 1,
|
||||||
id: clientId,
|
id: clientId,
|
||||||
...search,
|
...search,
|
||||||
});
|
});
|
||||||
|
@ -115,7 +115,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
setPermissions,
|
setPermissions,
|
||||||
[key, search]
|
[key, search, first, max]
|
||||||
);
|
);
|
||||||
|
|
||||||
useFetch(
|
useFetch(
|
||||||
|
|
|
@ -72,7 +72,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
|
||||||
async () => {
|
async () => {
|
||||||
const policies = await adminClient.clients.listPolicies({
|
const policies = await adminClient.clients.listPolicies({
|
||||||
first,
|
first,
|
||||||
max,
|
max: max + 1,
|
||||||
id: clientId,
|
id: clientId,
|
||||||
permission: "false",
|
permission: "false",
|
||||||
...search,
|
...search,
|
||||||
|
@ -101,7 +101,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
|
||||||
);
|
);
|
||||||
setPolicies(policies);
|
setPolicies(policies);
|
||||||
},
|
},
|
||||||
[key, search]
|
[key, search, first, max]
|
||||||
);
|
);
|
||||||
|
|
||||||
const DependentPoliciesRenderer = ({
|
const DependentPoliciesRenderer = ({
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
|
||||||
() => {
|
() => {
|
||||||
const params = {
|
const params = {
|
||||||
first,
|
first,
|
||||||
max,
|
max: max + 1,
|
||||||
deep: false,
|
deep: false,
|
||||||
...search,
|
...search,
|
||||||
};
|
};
|
||||||
|
@ -79,7 +79,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
|
||||||
setResources(
|
setResources(
|
||||||
resources.map((resource) => ({ ...resource, isExpanded: false }))
|
resources.map((resource) => ({ ...resource, isExpanded: false }))
|
||||||
),
|
),
|
||||||
[key, search]
|
[key, search, first, max]
|
||||||
);
|
);
|
||||||
|
|
||||||
const UriRenderer = ({ row }: { row: ResourceRepresentation }) => (
|
const UriRenderer = ({ row }: { row: ResourceRepresentation }) => (
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
|
||||||
async () => {
|
async () => {
|
||||||
const params = {
|
const params = {
|
||||||
first,
|
first,
|
||||||
max,
|
max: max + 1,
|
||||||
deep: false,
|
deep: false,
|
||||||
name: search,
|
name: search,
|
||||||
};
|
};
|
||||||
|
@ -93,7 +93,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
setScopes,
|
setScopes,
|
||||||
[key, search]
|
[key, search, first, max]
|
||||||
);
|
);
|
||||||
|
|
||||||
const ResourceRenderer = ({
|
const ResourceRenderer = ({
|
||||||
|
|
Loading…
Reference in a new issue