diff --git a/superset/assets/src/SqlLab/components/TableElement.jsx b/superset/assets/src/SqlLab/components/TableElement.jsx index 96027a926b..ce8847eb74 100644 --- a/superset/assets/src/SqlLab/components/TableElement.jsx +++ b/superset/assets/src/SqlLab/components/TableElement.jsx @@ -190,7 +190,11 @@ class TableElement extends React.PureComponent {
{table.isMetadataLoading || table.isExtraMetadataLoading ? - + : this.renderControls() } @@ -239,7 +243,6 @@ class TableElement extends React.PureComponent {
diff --git a/superset/assets/src/components/Loading.css b/superset/assets/src/components/Loading.css new file mode 100644 index 0000000000..4118962727 --- /dev/null +++ b/superset/assets/src/components/Loading.css @@ -0,0 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +img.loading.margin-zero { + margin: 0px; +} diff --git a/superset/assets/src/components/Loading.jsx b/superset/assets/src/components/Loading.jsx index a7d8f40b05..5c132d9c1b 100644 --- a/superset/assets/src/components/Loading.jsx +++ b/superset/assets/src/components/Loading.jsx @@ -19,13 +19,17 @@ import React from 'react'; import PropTypes from 'prop-types'; +import './Loading.css'; + const propTypes = { size: PropTypes.number, position: PropTypes.oneOf(['floating', 'normal']), + className: PropTypes.string, }; const defaultProps = { size: 50, position: 'floating', + className: '', }; const FLOATING_STYLE = { @@ -37,7 +41,7 @@ const FLOATING_STYLE = { transform: 'translate(-50%, -50%)', }; -export default function Loading({ size, position }) { +export default function Loading({ size, position, className }) { const style = position === 'floating' ? FLOATING_STYLE : {}; const styleWithWidth = { ...style, @@ -45,7 +49,7 @@ export default function Loading({ size, position }) { }; return (