16115: Adds warning notice for private visibility with active sharing urls.
[arvados-workbench2.git] / src / views-components / resource-properties-form / property-field-common.tsx
index 90a6a3011435622763cacde512d5083a938c1625..c4dc494b3967558179ba662df5272164d8593013 100644 (file)
@@ -2,13 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ChangeEvent } from 'react';
 import { connect } from 'react-redux';
-import { change, WrappedFieldMetaProps, WrappedFieldInputProps, WrappedFieldProps, reset } from 'redux-form';
-import { Vocabulary, PropFieldSuggestion } from '~/models/vocabulary';
-import { RootState } from '~/store/store';
-import { getVocabulary } from '~/store/vocabulary/vocabulary-selectors';
-import { PROPERTY_KEY_FIELD_ID } from './property-key-field';
+import { change, WrappedFieldMetaProps, WrappedFieldInputProps, WrappedFieldProps } from 'redux-form';
+import { Vocabulary, PropFieldSuggestion } from 'models/vocabulary';
+import { RootState } from 'store/store';
+import { getVocabulary } from 'store/vocabulary/vocabulary-selectors';
 
 export interface VocabularyProp {
     vocabulary: Vocabulary;
@@ -70,19 +68,3 @@ export const handleSelect = (
             dispatch(change(formName, fieldName, item.id));
         }
     };
-
-export const handleChange = (
-    fieldName: string,
-    formName: string,
-    { onChange }: WrappedFieldInputProps,
-    { dispatch }: WrappedFieldMetaProps) =>
-    (value: ChangeEvent<HTMLInputElement>) => {
-        if (fieldName === PROPERTY_KEY_FIELD_ID) {
-            // Properties' values are dependant on the keys, if any value is
-            // pre-existant, a change on the property key should mean that the
-            // previous value is invalid.
-            dispatch(reset(formName));
-        }
-        onChange(value);
-        dispatch(change(formName, fieldName, value));
-    };
\ No newline at end of file