diff --git a/superset/assets/src/components/ModalTrigger.jsx b/superset/assets/src/components/ModalTrigger.jsx index 1628238d7ca88..f8ab6510530ed 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'; @@ -82,31 +82,37 @@ export default class ModalTrigger extends React.Component { 'btn btn-default btn-sm': this.props.isButton, }); if (this.props.isButton) { - return [ - , - this.renderModal(), - ]; + return ( + + + {this.renderModal()} + + ); } else if (this.props.isMenuItem) { - return [ - - {this.props.triggerNode} - , - this.renderModal(), - ]; + return ( + + + {this.props.triggerNode} + + {this.renderModal()} + + ); } /* eslint-disable jsx-a11y/interactive-supports-focus */ - return [ - - {this.props.triggerNode} - , - this.renderModal(), - ]; + return ( + + + {this.props.triggerNode} + + {this.renderModal()} + + ); } }