diff --git a/src/pages/dataElements/form/fields.tsx b/src/pages/dataElements/form/fields.tsx index 4180be60..5d5dd74c 100644 --- a/src/pages/dataElements/form/fields.tsx +++ b/src/pages/dataElements/form/fields.tsx @@ -23,14 +23,14 @@ import { AGGREGATION_TYPE, DOMAIN_TYPE, VALUE_TYPE } from '../../../constants' import { useSchemas } from '../../../lib' import classes from './customFields.module.css' import { EditableFieldWrapper } from './EditableFieldWrapper' -import { useHasFieldValue } from './useHasFieldValue' +import { useIsFieldValueUnique } from './useIsFieldValueUnique' export function NameField() { const { loading, fetching, refetch: checkIsValueTaken, - } = useHasFieldValue('name') + } = useIsFieldValueUnique('name') return ( (HAS_FIELD_VALUE_QUERY, { lazy: true, variables: { field, value: '' },