15067: Removes unnecesssary hidden Field components.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 13 Nov 2019 20:31:31 +0000 (17:31 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 13 Nov 2019 20:31:31 +0000 (17:31 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

src/views-components/resource-properties-form/property-key-field.tsx
src/views-components/resource-properties-form/property-value-field.tsx

index f91b6a621a81f48f8e2a3a6c56430b6eee0f37b9..eb3c80509395d8f408e9950594eeef2372290629 100644 (file)
@@ -17,17 +17,11 @@ export const PROPERTY_KEY_FIELD_ID = 'keyID';
 
 export const PropertyKeyField = connectVocabulary(
     ({ vocabulary }: VocabularyProp) =>
-        <div>
-            <Field
-                name={PROPERTY_KEY_FIELD_NAME}
-                component={PropertyKeyInput}
-                vocabulary={vocabulary}
-                validate={getValidation(vocabulary)} />
-            <Field
-                name={PROPERTY_KEY_FIELD_ID}
-                type='hidden'
-                component='input' />
-        </div>
+        <Field
+            name={PROPERTY_KEY_FIELD_NAME}
+            component={PropertyKeyInput}
+            vocabulary={vocabulary}
+            validate={getValidation(vocabulary)} />
 );
 
 export const PropertyKeyInput = ({ vocabulary, ...props }: WrappedFieldProps & VocabularyProp) =>
index 959b98ec87280ebc4d7bd496729ae051000ccdb5..c2474735be70fdd7aafeedc584afa2fe4d941a5f 100644 (file)
@@ -27,17 +27,11 @@ export const PropertyValueField = compose(
     formValues({ propertyKey: PROPERTY_KEY_FIELD_ID })
 )(
     (props: PropertyValueFieldProps) =>
-        <div>
-            <Field
-                name={PROPERTY_VALUE_FIELD_NAME}
-                component={PropertyValueInput}
-                validate={getValidation(props)}
-                {...props} />
-            <Field
-                name={PROPERTY_VALUE_FIELD_ID}
-                type='hidden'
-                component='input' />
-        </div>
+        <Field
+            name={PROPERTY_VALUE_FIELD_NAME}
+            component={PropertyValueInput}
+            validate={getValidation(props)}
+            {...props} />
 );
 
 export const PropertyValueInput = ({ vocabulary, propertyKey, ...props }: WrappedFieldProps & PropertyValueFieldProps) =>