Calculate height dynamically using jquery for scrollable sqllab (#1611)

* Calculate height dynamically using jquery for scrollable sqllab components

* Move editorHeight to App.jsx

* Calculate height dynamically for query search
This commit is contained in:
vera-liu
2016-11-22 13:21:07 -08:00
committed by GitHub
parent 10982dec3c
commit db1ed2a765
6 changed files with 39 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ import AceEditorWrapper from './AceEditorWrapper';
const propTypes = {
actions: React.PropTypes.object.isRequired,
height: React.PropTypes.string.isRequired,
database: React.PropTypes.object,
latestQuery: React.PropTypes.object,
networkOn: React.PropTypes.bool,
@@ -212,13 +213,20 @@ class SqlEditor extends React.PureComponent {
</div>
);
return (
<div className="SqlEditor" style={{ minHeight: this.sqlEditorHeight() }}>
<div
className="SqlEditor"
style={{
minHeight: this.sqlEditorHeight(),
height: this.props.height,
}}
>
<Row>
<Collapse
in={!this.props.hideLeftBar}
>
<Col md={3}>
<SqlEditorLeftBar
style={{ height: this.props.height }}
queryEditor={this.props.queryEditor}
tables={this.props.tables}
networkOn={this.props.networkOn}