aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/javascript/helpers/CustomFieldsInputs.js4
-rw-r--r--app/javascript/journey_patterns/reducers/journeyPatterns.js1
2 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/helpers/CustomFieldsInputs.js b/app/javascript/helpers/CustomFieldsInputs.js
index 0a57e7566..93611538e 100644
--- a/app/javascript/helpers/CustomFieldsInputs.js
+++ b/app/javascript/helpers/CustomFieldsInputs.js
@@ -43,7 +43,7 @@ export default class CustomFieldsInputs extends Component {
ref={'custom_fields.' + cf.code}
className='form-control'
disabled={this.props.disabled}
- value={cf.value || this.options(cf).default}
+ value={cf.value || this.options(cf).default || ""}
onChange={(e) => {this.props.onUpdate(cf.code, e.target.value); this.forceUpdate()} }
/>
)
@@ -56,7 +56,7 @@ export default class CustomFieldsInputs extends Component {
ref={'custom_fields.' + cf.code}
className='form-control'
disabled={this.props.disabled}
- value={cf.value || this.options(cf).default}
+ value={cf.value || this.options(cf).default || ""}
onChange={(e) => {this.props.onUpdate(cf.code, e.target.value); this.forceUpdate()} }
/>
)
diff --git a/app/javascript/journey_patterns/reducers/journeyPatterns.js b/app/javascript/journey_patterns/reducers/journeyPatterns.js
index 1a6a27da6..9dcd82082 100644
--- a/app/javascript/journey_patterns/reducers/journeyPatterns.js
+++ b/app/javascript/journey_patterns/reducers/journeyPatterns.js
@@ -18,6 +18,7 @@ const journeyPattern = (state = {}, action) =>{
registration_number: action.data.registration_number.value,
stop_points: stopPoints,
costs: {},
+ custom_fields: action.data.custom_fields,
deletable: false
}
case 'UPDATE_CHECKBOX_VALUE':