[SQL Lab] Avoid closing save query modal on backdrop click (#7111)

Closes #7110
This commit is contained in:
Enrico Berti
2019-03-27 21:46:39 +01:00
committed by Krist Wongsuphasawat
parent c2b971af91
commit c99d9b5d3c
2 changed files with 3 additions and 0 deletions

View File

@@ -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')}

View File

@@ -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>