From 5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 14 Jul 2016 23:01:34 +0200
Subject: change way to edit

---
 web/src/js/components/FlowView/Messages.jsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'web/src/js/components/FlowView/Messages.jsx')

diff --git a/web/src/js/components/FlowView/Messages.jsx b/web/src/js/components/FlowView/Messages.jsx
index d2c42a54..27e18c05 100644
--- a/web/src/js/components/FlowView/Messages.jsx
+++ b/web/src/js/components/FlowView/Messages.jsx
@@ -6,6 +6,7 @@ import { Key, formatTimeStamp } from '../../utils.js'
 import ContentView from '../ContentView'
 import ValueEditor from '../ValueEditor'
 import Headers from './Headers'
+import * as flowActions  from '../../ducks/flows'
 
 class RequestLine extends Component {
 
@@ -89,7 +90,10 @@ export class Request extends Component {
                     onChange={headers => updateFlow({ request: { headers } })}
                 />
                 <hr/>
-                <ContentView flow={flow} message={flow.request} onChange={content => updateFlow({request: {content} })}/>
+                <ContentView flow={flow}
+                             onContentChange={content => flowActions.updateContent(this.props.flow, content, "request") }
+                             message={flow.request}
+                />
             </section>
         )
     }
@@ -128,7 +132,10 @@ export class Response extends Component {
                     onChange={headers => updateFlow({ response: { headers } })}
                 />
                 <hr/>
-                <ContentView flow={flow} message={flow.response} onChange={content => updateFlow({response: {content} }) }/>
+                <ContentView flow={flow}
+                             onContentChange={content => flowActions.updateContent(this.props.flow, content, "response") }
+                             message={flow.response}
+                />
             </section>
         )
     }
-- 
cgit v1.2.3

