diff --git a/frontend/my/src/Campaign.js b/frontend/my/src/Campaign.js index ef26125..12bc0ad 100644 --- a/frontend/my/src/Campaign.js +++ b/frontend/my/src/Campaign.js @@ -308,7 +308,10 @@ class TheFormDef extends React.PureComponent { })()} - {getFieldDecorator("lists", { initialValue: subLists, rules: [{ required: true }] })( + {getFieldDecorator("lists", { + initialValue: subLists.length > 0 ? subLists : (this.props.data[cs.ModelLists].length === 1 ? [this.props.data[cs.ModelLists][0].id] : undefined), + rules: [{ required: true }] + })( - {[...this.props.data[cs.ModelTemplates]].map((v, i) => + {this.props.data[cs.ModelTemplates].map((v, i) => { v["name"] } )}