-const isStrictTag = (tagName: string, vocabulary: Vocabulary) => {
- const tag = vocabulary.tags[tagName];
- return tag ? tag.strict : false;
-};
+// Attempts to match a manually typed value label with a value ID, when the user
+// doesn't select the value from the suggestions list.
+const handleBlur = (
+ { dispatch }: WrappedFieldMetaProps,
+ { onBlur, value }: WrappedFieldInputProps,
+ vocabulary: Vocabulary,
+ tagKeyID: string) =>
+ () => {
+ dispatch(change(COLLECTION_TAG_FORM_NAME, PROPERTY_VALUE_FIELD_ID, getTagValueID(tagKeyID, value, vocabulary)));
+ onBlur(value);
+ };