Browse Source

fixed reloadContent event + renamed unmountApp function from app's interface

Skylsmoi 5 years ago
parent
commit
b1f5fcfca8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/container/HtmlDocument.jsx
  2. 1 1
      src/index.js

+ 1 - 1
src/container/HtmlDocument.jsx View File

@@ -41,7 +41,7 @@ class HtmlDocument extends React.Component {
41 41
         this.setState({isVisible: false})
42 42
         break
43 43
       case 'html-documents_reloadContent':
44
-        this.setState({content: data})
44
+        this.setState(prev => ({content: {...prev.content, ...data}}))
45 45
     }
46 46
   }
47 47
 

+ 1 - 1
src/index.js View File

@@ -34,7 +34,7 @@ const appInterface = {
34 34
       , document.getElementById(data.config.domContainer)
35 35
     )
36 36
   },
37
-  hideApp: domId => {
37
+  unmountApp: domId => {
38 38
     return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
39 39
   },
40 40
   renderPopupCreation: data => {