From 119b0c55e972d4b4b93ff9df4d7e99d14b9b8453 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 6 Jan 2017 09:41:53 -0800 Subject: [PATCH] [explore] fix height in embed mode (#1898) * [explore] fix height in embed mode * Linting --- .../explore/components/EmbedCodeButton.jsx | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/superset/assets/javascripts/explore/components/EmbedCodeButton.jsx b/superset/assets/javascripts/explore/components/EmbedCodeButton.jsx index bf411a25be1bf..3582229dd8007 100644 --- a/superset/assets/javascripts/explore/components/EmbedCodeButton.jsx +++ b/superset/assets/javascripts/explore/components/EmbedCodeButton.jsx @@ -25,15 +25,21 @@ export default class EmbedCodeButton extends React.Component { } generateEmbedHTML() { - const srcLink = window.location.origin + this.props.slice.data.standalone_endpoint; - /* eslint max-len: 0 */ - return ` - `; + const srcLink = ( + window.location.origin + + this.props.slice.data.standalone_endpoint + + `&height=${this.state.height}` + ); + return ( + '\n' + + '' + ); } renderPopover() { @@ -43,7 +49,14 @@ export default class EmbedCodeButton extends React.Component {
- +