@dhis2-ui/portal 8.1.11 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/portal.js +6 -5
- package/build/es/portal.js +6 -5
- package/package.json +1 -1
package/build/cjs/portal.js
CHANGED
|
@@ -24,11 +24,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
24
|
*/
|
|
25
25
|
const defaultNode = document.getElementById('dhis2-portal-root') || document.body;
|
|
26
26
|
|
|
27
|
-
const Portal =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
const Portal = _ref => {
|
|
28
|
+
let {
|
|
29
|
+
children,
|
|
30
|
+
node,
|
|
31
|
+
disable
|
|
32
|
+
} = _ref;
|
|
32
33
|
const [mountNode, setMountNode] = (0, _react.useState)(null);
|
|
33
34
|
(0, _react.useEffect)(() => {
|
|
34
35
|
setMountNode(node || defaultNode);
|
package/build/es/portal.js
CHANGED
|
@@ -12,11 +12,12 @@ import { createPortal } from 'react-dom';
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
const defaultNode = document.getElementById('dhis2-portal-root') || document.body;
|
|
15
|
-
export const Portal =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
export const Portal = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
children,
|
|
18
|
+
node,
|
|
19
|
+
disable
|
|
20
|
+
} = _ref;
|
|
20
21
|
const [mountNode, setMountNode] = useState(null);
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
setMountNode(node || defaultNode);
|