diff --git a/app/react/components/form-components/SwitchField/SwitchField.tsx b/app/react/components/form-components/SwitchField/SwitchField.tsx index 0bd13d008..d8f9d783d 100644 --- a/app/react/components/form-components/SwitchField/SwitchField.tsx +++ b/app/react/components/form-components/SwitchField/SwitchField.tsx @@ -1,5 +1,6 @@ import clsx from 'clsx'; import { ComponentProps } from 'react'; +import uuid from 'uuid'; import { FeatureId } from '@/react/portainer/feature-flags/enums'; @@ -30,7 +31,7 @@ export function SwitchField({ checked, label, index, - name, + name = uuid(), labelClass, fieldClass, dataCy, @@ -43,15 +44,16 @@ export function SwitchField({ const toggleName = name ? `toggle_${name}` : ''; return ( - - + ); }