mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
Fix separator visualization by propagating header height (#4437)
This commit is contained in:
committed by
Maxime Beauchemin
parent
d6f1024d99
commit
0c87e23877
@@ -20,6 +20,7 @@ const propTypes = {
|
||||
containerId: PropTypes.string.isRequired,
|
||||
datasource: PropTypes.object.isRequired,
|
||||
formData: PropTypes.object.isRequired,
|
||||
headerHeight: PropTypes.number,
|
||||
height: PropTypes.number,
|
||||
width: PropTypes.number,
|
||||
setControlValue: PropTypes.func,
|
||||
@@ -63,6 +64,7 @@ class Chart extends React.PureComponent {
|
||||
this.getFilters = this.getFilters.bind(this);
|
||||
this.clearFilter = this.clearFilter.bind(this);
|
||||
this.removeFilter = this.removeFilter.bind(this);
|
||||
this.headerHeight = this.headerHeight.bind(this);
|
||||
this.height = this.height.bind(this);
|
||||
this.width = this.width.bind(this);
|
||||
}
|
||||
@@ -129,6 +131,10 @@ class Chart extends React.PureComponent {
|
||||
return this.props.width || this.container.el.offsetWidth;
|
||||
}
|
||||
|
||||
headerHeight() {
|
||||
return this.props.headerHeight || 0;
|
||||
}
|
||||
|
||||
height() {
|
||||
return this.props.height || this.container.el.offsetHeight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user