File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,7 @@ class TheFormDef extends React.PureComponent {
322
322
description : `"${ values [ "name" ] } " updated`
323
323
} )
324
324
this . setState ( { loading : false } )
325
+ this . props . setRecord ( resp . data . data )
325
326
cb ( true )
326
327
} )
327
328
. catch ( e => {
@@ -632,12 +633,17 @@ class Campaign extends React.PureComponent {
632
633
}
633
634
}
634
635
636
+ setRecord = r => {
637
+ this . setState ( { record : r } )
638
+ }
639
+
635
640
fetchRecord = id => {
636
641
this . props
637
642
. request ( cs . Routes . GetCampaign , cs . MethodGet , { id : id } )
638
643
. then ( r => {
639
644
const record = r . data . data
640
- this . setState ( { record : record , loading : false } )
645
+ this . setState ( { loading : false } )
646
+ this . setRecord ( record )
641
647
642
648
// The form for non draft and scheduled campaigns should be locked.
643
649
if (
@@ -780,6 +786,7 @@ class Campaign extends React.PureComponent {
780
786
this . setState ( { formRef : r } )
781
787
} }
782
788
record = { this . state . record }
789
+ setRecord = { this . setRecord }
783
790
isSingle = { this . state . record . id ? true : false }
784
791
body = {
785
792
this . state . body ? this . state . body : this . state . record . body
You can’t perform that action at this time.
0 commit comments