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
       }
13
       }
14
 
14
 
15
       {props.mode === MODE.EDIT &&
15
       {props.mode === MODE.EDIT &&
16
-        <TextAreaApp customClass={'wsContentPageHtml'} onClickCancelBtn={props.onClickCloseNewVersion}/>
16
+        <TextAreaApp customClass={'wsContentPageHtml'} onClickCancelBtn={props.onClickCloseEditMode}/>
17
       }
17
       }
18
     </div>
18
     </div>
19
   )
19
   )

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

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

+ 5 - 0
src/helper.js View File

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