[SqlLab] Fix a few UI issues (#4401)

1. tab alignment css
2. if tabs are more than 1 row, need to calculate content area height
3. clean up height calculation.
This commit is contained in:
Grace Guo
2018-02-13 10:18:09 -08:00
committed by GitHub
parent 4a6adb2f27
commit db24cef03b
6 changed files with 26 additions and 21 deletions

View File

@@ -19,7 +19,7 @@ const propTypes = {
queryEditors: PropTypes.array,
tabHistory: PropTypes.array.isRequired,
tables: PropTypes.array.isRequired,
editorHeight: PropTypes.string.isRequired,
getHeight: PropTypes.func.isRequired,
};
const defaultProps = {
queryEditors: [],
@@ -193,7 +193,7 @@ class TabbedSqlEditors extends React.PureComponent {
<div className="panel-body">
{isSelected &&
<SqlEditor
height={this.props.editorHeight}
getHeight={this.props.getHeight}
tables={this.props.tables.filter(xt => (xt.queryEditorId === qe.id))}
queryEditor={qe}
editorQueries={this.state.queriesArray}