15672: Fixes test
[arvados-workbench2.git] / src / views-components / resource-properties-form / property-key-field.tsx
index e03e9be5a638886fd42eaf492d1803b8ac7d70d7..1f92118885690992b19cb6c81e5a88eaea47c959 100644 (file)
@@ -7,19 +7,15 @@ import { WrappedFieldProps, Field, FormName } from 'redux-form';
 import { memoize } from 'lodash';
 import { Autocomplete } from '~/components/autocomplete/autocomplete';
 import { Vocabulary, getTags, getTagKeyID } from '~/models/vocabulary';
-import { handleSelect, handleBlur, connectVocabulary, VocabularyProp, buildProps } from '~/views-components/resource-properties-form/property-field-common';
+import { handleSelect, handleBlur, connectVocabulary, VocabularyProp, ValidationProp, buildProps } from '~/views-components/resource-properties-form/property-field-common';
 import { TAG_KEY_VALIDATION } from '~/validators/validators';
 import { escapeRegExp } from '~/common/regexp.ts';
 
 export const PROPERTY_KEY_FIELD_NAME = 'key';
 export const PROPERTY_KEY_FIELD_ID = 'keyID';
 
-interface PropertyKeyFieldProps {
-    skipValidation?: boolean;
-}
-
 export const PropertyKeyField = connectVocabulary(
-    ({ vocabulary, skipValidation }: VocabularyProp & PropertyKeyFieldProps) =>
+    ({ vocabulary, skipValidation }: VocabularyProp & ValidationProp) =>
         <Field
             name={PROPERTY_KEY_FIELD_NAME}
             component={PropertyKeyInput}
@@ -36,7 +32,7 @@ const PropertyKeyInput = ({ vocabulary, ...props }: WrappedFieldProps & Vocabula
             onBlur={handleBlur(PROPERTY_KEY_FIELD_ID, data.form, props.meta, props.input, getTagKeyID(props.input.value, vocabulary))}
             {...buildProps(props)}
         />
-    )}/>;
+    )} />;
 
 const getValidation = memoize(
     (vocabulary: Vocabulary) =>