Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

revalidate on action change

Scott Wilsonab55be4796df
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionPolicies.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionPolicies.tsx
index 4061c776de..84b1a396b1 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionPolicies.tsx
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionPolicies.tsx
@@ -120,7 +120,7 @@ const ActionsMultiSelect = <T extends ProjectPermissionSub>({
control,
menuPortalContainerRef
}: ActionsMultiSelectProps<T>) => {
- const { setValue } = useFormContext<TFormSchema>();
+ const { setValue, trigger } = useFormContext<TFormSchema>();
const { errors } = useFormState({
control,
@@ -212,10 +212,10 @@ const ActionsMultiSelect = <T extends ProjectPermissionSub>({
const isSelected = selectedArray.some((s: { value: string }) => s.value === valueStr);
setValue(`permissions.${subject}.${rootIndex}.${valueStr}` as any, isSelected, {
shouldDirty: true,
- shouldTouch: true,
- shouldValidate: true
+ shouldTouch: true
});
});
+ void trigger("permissions");
};
return (