diff --git a/frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/CreateNewSubformLayoutSet.tsx b/frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/CreateNewSubformLayoutSet.tsx index 09aae123e3d..fd041cdd149 100644 --- a/frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/CreateNewSubformLayoutSet.tsx +++ b/frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/CreateNewSubformLayoutSet.tsx @@ -28,6 +28,10 @@ export const CreateNewSubformLayoutSet = ({ setNewSubform(e.target.value); } + function handleCreateSubform() { + createSubform({ layoutSetName: newSubform, onSubformCreated }); + } + return ( @@ -44,7 +48,7 @@ export const CreateNewSubformLayoutSet = ({ } - onClick={() => createSubform({ layoutSetName: newSubform, onSubformCreated })} + onClick={handleCreateSubform} title={t('general.close')} disabled={!newSubform || !!nameError} variant='tertiary'