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

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