summaryrefslogtreecommitdiff
path: root/src/components/modals/TextInputModal.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-16 22:55:16 +0300
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:42 +0200
commit07195f3762b6a8a7dfb44c2231db58c5be13c43f (patch)
tree2b4640457f70b55a97aff22fbe617e4b8538464a /src/components/modals/TextInputModal.js
parent91c8088e1d7def9242f60c708cd34f25dcb77d76 (diff)
Rename project to sim and enable sim-adding
Diffstat (limited to 'src/components/modals/TextInputModal.js')
-rw-r--r--src/components/modals/TextInputModal.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/modals/TextInputModal.js b/src/components/modals/TextInputModal.js
index 4acf25b3..90a5db12 100644
--- a/src/components/modals/TextInputModal.js
+++ b/src/components/modals/TextInputModal.js
@@ -27,10 +27,14 @@ class TextInputModal extends React.Component {
show={this.props.show}
onSubmit={this.onSubmit.bind(this)}
onCancel={this.onCancel.bind(this)}>
- <form>
+ <form onSubmit={e => {
+ e.preventDefault();
+ this.onSubmit();
+ }}>
<div className="form-group">
<label className="form-control-label">{this.props.label}:</label>
- <input type="text" className="form-control" ref="textInput" value={this.props.initialValue}/>
+ <input type="text" className="form-control" ref="textInput" value={this.props.initialValue}
+ autoFocus/>
</div>
</form>
</Modal>