Browse Source

bug fixe react on edit mode

AlexiCauvin 6 years ago
parent
commit
e35a11c296
3 changed files with 8 additions and 3 deletions
  1. 1 1
      src/component/PageHtml.jsx
  2. 2 2
      src/container/PageHtml.jsx
  3. 5 0
      src/helper.js

+ 1 - 1
src/component/PageHtml.jsx View File

@@ -13,7 +13,7 @@ const PageHtml = props => {
13 13
       }
14 14
 
15 15
       {props.mode === MODE.EDIT &&
16
-        <TextAreaApp customClass={'wsContentPageHtml'} onClickCancelBtn={props.onClickCloseNewVersion}/>
16
+        <TextAreaApp customClass={'wsContentPageHtml'} onClickCancelBtn={props.onClickCloseEditMode}/>
17 17
       }
18 18
     </div>
19 19
   )

+ 2 - 2
src/container/PageHtml.jsx View File

@@ -133,14 +133,14 @@ class pageHtml extends React.Component {
133 133
 
134 134
         <PopinFixedOption
135 135
           customClass={`${config.customClass}`}
136
-          onClickNewVersion={this.handleClickNewVersion}
136
+          onClickNewVersionBtn={this.handleClickNewVersion}
137 137
           i18n={i18n}
138 138
         />
139 139
 
140 140
         <PopinFixedContent customClass={`${config.customClass}__contentpage`}>
141 141
           <PageHtmlComponent
142 142
             mode={this.state.mode}
143
-            onClickCloseNewVersion={this.handleCloseNewVersion}
143
+            onClickCloseEditMode={this.handleCloseNewVersion}
144 144
             version={content.version}
145 145
             text={content.text}
146 146
             key={'PageHtml'}

+ 5 - 0
src/helper.js View File

@@ -4,3 +4,8 @@ export const FETCH_CONFIG = {
4 4
     'Content-Type': 'application/json'
5 5
   }
6 6
 }
7
+
8
+export const MODE = {
9
+  VIEW: 'view',
10
+  EDIT: 'edit'
11
+}