diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx index 71dfb610a915..f082a2931681 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx @@ -283,6 +283,7 @@ export const EditPackagePolicyForm = memo<{ // Update package policy method const updatePackagePolicy = useCallback( (updatedFields: Partial) => { + setIsEdited(true); const newPackagePolicy = { ...packagePolicy, ...updatedFields, @@ -343,6 +344,7 @@ export const EditPackagePolicyForm = memo<{ }, [from, getHref, packageInfo, policyId]); // Save package policy + const [isEdited, setIsEdited] = useState(false); const [formState, setFormState] = useState('INVALID'); const savePackagePolicy = async () => { setFormState('LOADING'); @@ -582,7 +584,8 @@ export const EditPackagePolicyForm = memo<{