Skip to content

Commit

Permalink
Fix imports and QuerySearch styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Oct 15, 2020
1 parent 9b18e67 commit 1064e44
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/spec/javascripts/sqllab/QueryTable_spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import React from 'react';
import { shallow } from 'enzyme';
import QueryTable from 'src/SqlLab/components/QueryTable';
import { TableView } from 'src/components/ListView/TableView';
import TableCollection from 'src/components/ListView/TableCollection';
import TableView from 'src/components/TableView';
import { TableCollection } from 'src/components/dataViewCommon';
import { queries } from './fixtures';

describe('QueryTable', () => {
Expand Down
17 changes: 13 additions & 4 deletions superset-frontend/src/SqlLab/components/QuerySearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import Button from 'src/components/Button';
import Select from 'src/components/Select';
import { t, SupersetClient } from '@superset-ui/core';
import { styled, t, SupersetClient } from '@superset-ui/core';

import Loading from '../../components/Loading';
import QueryTable from './QueryTable';
Expand All @@ -39,6 +39,15 @@ const propTypes = {
displayLimit: PropTypes.number.isRequired,
};

const TableStyles = styled.div`
height: ${props => props.height};
.table > thead > tr > th {
border-bottom: 2px solid #cfd8dc;
background: #f5f5f5;
}
`;

class QuerySearch extends React.PureComponent {
constructor(props) {
super(props);
Expand Down Expand Up @@ -278,9 +287,9 @@ class QuerySearch extends React.PureComponent {
{this.state.queriesLoading ? (
<Loading />
) : (
<div
<TableStyles
className="scrollbar-content"
style={{ height: this.props.height }}
height={this.props.height}
>
<QueryTable
columns={[
Expand All @@ -299,7 +308,7 @@ class QuerySearch extends React.PureComponent {
actions={this.props.actions}
displayLimit={this.props.displayLimit}
/>
</div>
</TableStyles>
)}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/SqlLab/components/QueryTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Label from 'src/components/Label';
import { t } from '@superset-ui/core';
import memoize from 'lodash/memoize';

import { TableView } from 'src/components/ListView';
import TableView from 'src/components/TableView';
import Button from 'src/components/Button';
import { fDuration } from 'src/modules/dates';
import Link from '../../components/Link';
Expand Down

0 comments on commit 1064e44

Please sign in to comment.