superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: fixed modal close issue (#5865)
Date Thu, 13 Sep 2018 04:28:48 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 10836ce  fixed modal close issue (#5865)
10836ce is described below

commit 10836ce53c8261cc96db89e0be9c536e4a771896
Author: Conglei <shiconglei@gmail.com>
AuthorDate: Wed Sep 12 21:28:45 2018 -0700

    fixed modal close issue (#5865)
    
    * fixed modal close issue
    
    * change Children array to Fragment
---
 superset/assets/src/components/ModalTrigger.jsx | 34 +++++++++++++++----------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/superset/assets/src/components/ModalTrigger.jsx b/superset/assets/src/components/ModalTrigger.jsx
index 83e8db3..f8ab651 100644
--- a/superset/assets/src/components/ModalTrigger.jsx
+++ b/superset/assets/src/components/ModalTrigger.jsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { Fragment } from 'react';
 import PropTypes from 'prop-types';
 import { Modal, MenuItem } from 'react-bootstrap';
 import cx from 'classnames';
@@ -83,29 +83,35 @@ export default class ModalTrigger extends React.Component {
     });
     if (this.props.isButton) {
       return (
-        <Button
-          className="modal-trigger"
-          tooltip={this.props.tooltip}
-          onClick={this.open}
-        >
-          {this.props.triggerNode}
+        <Fragment>
+          <Button
+            className="modal-trigger"
+            tooltip={this.props.tooltip}
+            onClick={this.open}
+          >
+            {this.props.triggerNode}
+          </Button>
           {this.renderModal()}
-        </Button>
+        </Fragment>
       );
     } else if (this.props.isMenuItem) {
       return (
-        <MenuItem onClick={this.open}>
-          {this.props.triggerNode}
+        <Fragment>
+          <MenuItem onClick={this.open}>
+            {this.props.triggerNode}
+          </MenuItem>
           {this.renderModal()}
-        </MenuItem>
+        </Fragment>
       );
     }
     /* eslint-disable jsx-a11y/interactive-supports-focus */
     return (
-      <span className={classNames} onClick={this.open} role="button">
-        {this.props.triggerNode}
+      <Fragment>
+        <span className={classNames} onClick={this.open} role="button">
+          {this.props.triggerNode}
+        </span>
         {this.renderModal()}
-      </span>
+      </Fragment>
     );
   }
 }


Mime
View raw message