You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/09/13 04:28:48 UTC
[incubator-superset] branch master updated: fixed modal close issue
(#5865)
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 <sh...@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>
);
}
}