X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9de00081201406e11ed0ad1ba16af7ae732f402a..c44f9aa1e0b36cac00eca89d694876d40d427615:/src/views-components/resource-properties-form/property-key-field.tsx diff --git a/src/views-components/resource-properties-form/property-key-field.tsx b/src/views-components/resource-properties-form/property-key-field.tsx index e03e9be5a6..d17f50d465 100644 --- a/src/views-components/resource-properties-form/property-key-field.tsx +++ b/src/views-components/resource-properties-form/property-key-field.tsx @@ -7,24 +7,22 @@ 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) => + + ); const PropertyKeyInput = ({ vocabulary, ...props }: WrappedFieldProps & VocabularyProp) => @@ -36,7 +34,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) =>