wires up initial data population for editing records

This commit is contained in:
James
2018-12-06 17:08:45 -08:00
parent b749211fcb
commit e044c53dfa
3 changed files with 7 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ class Input extends Component {
? this.props.value
: '';
const contextValue = this.props.context.fields[this.props.name]
const contextValue = (this.props.context.fields[this.props.name] && this.props.context.fields[this.props.name].value)
? this.props.context.fields[this.props.name].value
: initialValue;

View File

@@ -92,7 +92,7 @@ class Textarea extends Component {
? this.props.value
: '';
const contextValue = this.props.context.fields[this.props.name]
const contextValue = (this.props.context.fields[this.props.name] && this.props.context.fields[this.props.name].value)
? this.props.context.fields[this.props.name].value
: initialValue;