mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
[explore] fix query text modal while loading (#2596)
* [explore] fix and clean Currently it's not possible to view queries while they are running, the spinner appears endlessly. I decided to rearrange things a bit while debugging so I could see clearly through it. * Adding NotImplemented methods to base classes * Fixing * Piling up
This commit is contained in:
committed by
GitHub
parent
2df6baa7a7
commit
db02b33e09
@@ -4,6 +4,7 @@ import cx from 'classnames';
|
||||
import Button from './Button';
|
||||
|
||||
const propTypes = {
|
||||
animation: PropTypes.bool,
|
||||
triggerNode: PropTypes.node.isRequired,
|
||||
modalTitle: PropTypes.node.isRequired,
|
||||
modalBody: PropTypes.node, // not required because it can be generated by beforeOpen
|
||||
@@ -17,6 +18,7 @@ const propTypes = {
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
animation: true,
|
||||
beforeOpen: () => {},
|
||||
onExit: () => {},
|
||||
isButton: false,
|
||||
@@ -46,6 +48,7 @@ export default class ModalTrigger extends React.Component {
|
||||
renderModal() {
|
||||
return (
|
||||
<Modal
|
||||
animation={this.props.animation}
|
||||
show={this.state.showModal}
|
||||
onHide={this.close}
|
||||
onExit={this.props.onExit}
|
||||
@@ -73,7 +76,11 @@ export default class ModalTrigger extends React.Component {
|
||||
});
|
||||
if (this.props.isButton) {
|
||||
return (
|
||||
<Button tooltip={this.props.tooltip} onClick={this.open}>
|
||||
<Button
|
||||
className="modal-trigger"
|
||||
tooltip={this.props.tooltip}
|
||||
onClick={this.open}
|
||||
>
|
||||
{this.props.triggerNode}
|
||||
{this.renderModal()}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user