aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/fields/InputField.js
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-09-27 15:48:38 +0000
committerEmiliano Ciavatta2020-09-27 15:48:38 +0000
commit1412a34f64e234dbc7d4e6815b841699f4dd104a (patch)
tree3575bfa3d8e4d926066d3a84991809ca14083d97 /frontend/src/components/fields/InputField.js
parent44af615b32faf53c04cd38cb63782cf1b1332c94 (diff)
Add other custom fields
Diffstat (limited to 'frontend/src/components/fields/InputField.js')
-rw-r--r--frontend/src/components/fields/InputField.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/components/fields/InputField.js b/frontend/src/components/fields/InputField.js
index af3b3df..6cf967a 100644
--- a/frontend/src/components/fields/InputField.js
+++ b/frontend/src/components/fields/InputField.js
@@ -1,5 +1,6 @@
import React, {Component} from 'react';
import './InputField.scss';
+import './common.scss';
import {randomClassName} from "../../utils";
const classNames = require('classnames');
@@ -36,12 +37,12 @@ class InputField extends Component {
};
let inputProps = {};
if (type !== "file") {
- inputProps["value"] = value;
+ inputProps["value"] = value || this.props.initialValue;
}
return (
- <div className={classNames("input-field", {"field-active" : active}, {"field-invalid": invalid},
- {"field-small": small}, {"field-inline": inline})}>
+ <div className={classNames("field", "input-field", {"field-active" : active},
+ {"field-invalid": invalid}, {"field-small": small}, {"field-inline": inline})}>
<div className="field-wrapper">
{ name &&
<div className="field-name">