superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kri...@apache.org
Subject [incubator-superset] branch master updated: [SQL Lab] Avoid closing save query modal on backdrop click (#7111)
Date Wed, 27 Mar 2019 20:46:57 GMT
This is an automated email from the ASF dual-hosted git repository.

kristw 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 c99d9b5  [SQL Lab] Avoid closing save query modal on backdrop click (#7111)
c99d9b5 is described below

commit c99d9b5d3c5862c4b5cf9082e4246cf12f7e3916
Author: Enrico Berti <hello@enricoberti.com>
AuthorDate: Wed Mar 27 21:46:39 2019 +0100

    [SQL Lab] Avoid closing save query modal on backdrop click (#7111)
    
    Closes #7110
---
 superset/assets/src/SqlLab/components/SaveQuery.jsx | 1 +
 superset/assets/src/components/ModalTrigger.jsx     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/superset/assets/src/SqlLab/components/SaveQuery.jsx b/superset/assets/src/SqlLab/components/SaveQuery.jsx
index 6ae2508..1b3c502 100644
--- a/superset/assets/src/SqlLab/components/SaveQuery.jsx
+++ b/superset/assets/src/SqlLab/components/SaveQuery.jsx
@@ -146,6 +146,7 @@ class SaveQuery extends React.PureComponent {
           ref={(ref) => { this.saveModal = ref; }}
           modalTitle={t('Save Query')}
           modalBody={this.renderModalBody()}
+          backdrop="static"
           triggerNode={
             <Button bsSize="small" className="toggleSave" onClick={this.toggleSave}>
               <i className="fa fa-save" /> {t('Save Query')}
diff --git a/superset/assets/src/components/ModalTrigger.jsx b/superset/assets/src/components/ModalTrigger.jsx
index f20a8b2..750be52 100644
--- a/superset/assets/src/components/ModalTrigger.jsx
+++ b/superset/assets/src/components/ModalTrigger.jsx
@@ -36,6 +36,7 @@ const propTypes = {
   bsSize: PropTypes.string,
   className: PropTypes.string,
   tooltip: PropTypes.string,
+  backdrop: PropTypes.oneOf(['static', true, false]),
 };
 
 const defaultProps = {
@@ -77,6 +78,7 @@ export default class ModalTrigger extends React.Component {
         onExit={this.props.onExit}
         bsSize={this.props.bsSize}
         className={this.props.className}
+        backdrop={this.props.backdrop}
       >
         {this.props.modalTitle &&
           <Modal.Header closeButton>


Mime
View raw message