Browse Source

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

Skylsmoi 7 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
         this.setState({isVisible: false})
41
         this.setState({isVisible: false})
42
         break
42
         break
43
       case 'html-documents_reloadContent':
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
       , document.getElementById(data.config.domContainer)
34
       , document.getElementById(data.config.domContainer)
35
     )
35
     )
36
   },
36
   },
37
-  hideApp: domId => {
37
+  unmountApp: domId => {
38
     return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
38
     return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
39
   },
39
   },
40
   renderPopupCreation: data => {
40
   renderPopupCreation: data => {