mirror of
https://github.com/apache/superset.git
synced 2026-04-10 11:55:24 +00:00
[explore] fix height in embed mode (#1898)
* [explore] fix height in embed mode * Linting
This commit is contained in:
committed by
GitHub
parent
c14c7edc5e
commit
119b0c55e9
@@ -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 `
|
||||
<iframe
|
||||
src="${srcLink}"
|
||||
width="${this.state.width}"
|
||||
height="${this.state.height}"
|
||||
seamless frameBorder="0" scrolling="no">
|
||||
</iframe>`;
|
||||
const srcLink = (
|
||||
window.location.origin +
|
||||
this.props.slice.data.standalone_endpoint +
|
||||
`&height=${this.state.height}`
|
||||
);
|
||||
return (
|
||||
'<iframe\n' +
|
||||
` width="${this.state.width}"\n` +
|
||||
` height="${this.state.height}"\n` +
|
||||
' seamless\n' +
|
||||
' frameBorder="0" scrolling="no"\n' +
|
||||
` src="${srcLink}"\n` +
|
||||
'>\n' +
|
||||
'</iframe>'
|
||||
);
|
||||
}
|
||||
|
||||
renderPopover() {
|
||||
@@ -43,7 +49,14 @@ export default class EmbedCodeButton extends React.Component {
|
||||
<div>
|
||||
<div className="row">
|
||||
<div className="col-sm-10">
|
||||
<textarea name="embedCode" value={html} rows="4" readOnly className="form-control input-sm"></textarea>
|
||||
<textarea
|
||||
name="embedCode"
|
||||
value={html}
|
||||
rows="4"
|
||||
readOnly
|
||||
className="form-control input-sm"
|
||||
>
|
||||
</textarea>
|
||||
</div>
|
||||
<div className="col-sm-2">
|
||||
<CopyToClipboard
|
||||
|
||||
Reference in New Issue
Block a user