X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c9af1d15f8dd176f335b87c05b10d02e8bbf01f3..dd315a23e98b926d4d15b9d05f1aaa1e211548a4:/src/views-components/resource-properties-form/property-value-field.tsx diff --git a/src/views-components/resource-properties-form/property-value-field.tsx b/src/views-components/resource-properties-form/property-value-field.tsx index 5043bca7d2..99745199fe 100644 --- a/src/views-components/resource-properties-form/property-value-field.tsx +++ b/src/views-components/resource-properties-form/property-value-field.tsx @@ -3,49 +3,48 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { change, WrappedFieldProps, WrappedFieldMetaProps, WrappedFieldInputProps, Field, formValues } from 'redux-form'; +import { WrappedFieldProps, Field, formValues, FormName } from 'redux-form'; import { compose } from 'redux'; import { Autocomplete } from '~/components/autocomplete/autocomplete'; -import { Vocabulary } from '~/models/vocabulary'; +import { Vocabulary, isStrictTag, getTagValues, getTagValueID } from '~/models/vocabulary'; import { PROPERTY_KEY_FIELD_ID } from '~/views-components/resource-properties-form/property-key-field'; -import { VocabularyProp, connectVocabulary, buildProps, PropFieldSuggestion } from '~/views-components/resource-properties-form/property-field-common'; +import { handleSelect, handleBlur, VocabularyProp, ValidationProp, connectVocabulary, buildProps } from '~/views-components/resource-properties-form/property-field-common'; import { TAG_VALUE_VALIDATION } from '~/validators/validators'; -import { COLLECTION_TAG_FORM_NAME } from '~/store/collection-panel/collection-panel-action'; +import { escapeRegExp } from '~/common/regexp.ts'; interface PropertyKeyProp { propertyKey: string; } -export type PropertyValueFieldProps = VocabularyProp & PropertyKeyProp; +type PropertyValueFieldProps = VocabularyProp & PropertyKeyProp & ValidationProp; export const PROPERTY_VALUE_FIELD_NAME = 'value'; export const PROPERTY_VALUE_FIELD_ID = 'valueID'; -export const PropertyValueField = compose( +const connectVocabularyAndPropertyKey = compose( connectVocabulary, - formValues({ propertyKey: PROPERTY_KEY_FIELD_ID }) -)( - (props: PropertyValueFieldProps) => -