summaryrefslogtreecommitdiff
path: root/frontend/app/common/form.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-31 17:37:40 +0200
committerJules Laplace <julescarbon@gmail.com>2021-03-31 17:37:40 +0200
commitcda9c115283be8e4e224f6036ba07e5eca243289 (patch)
treed0b150bf108813873c7b59cc9f9bd9c00ea3eba7 /frontend/app/common/form.component.js
parenta6793f922991d326eeb33cf08b245863218eaef7 (diff)
refactor tile forms into own files. add full-width marquee support
Diffstat (limited to 'frontend/app/common/form.component.js')
-rw-r--r--frontend/app/common/form.component.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/app/common/form.component.js b/frontend/app/common/form.component.js
index de1020a..ea4c5cb 100644
--- a/frontend/app/common/form.component.js
+++ b/frontend/app/common/form.component.js
@@ -68,7 +68,7 @@ export class NumberInput extends Component {
onKeyDown={this.handleKeyDown}
onChange={props.onChange}
name={props.name}
- value={props.data[props.name]}
+ value={props.name in props.data ? props.data[props.name] : (props.defaultValue || props.min)}
min={props.min}
max={props.max}
step={props.step || 1}