mirror of https://github.com/apache/superset.git
fix: do not show vertical scrollbar for charts in dashboard (#12478)
* fix: do not show vertical scrollbar for charts in dashboard * Proper fix for #11419 Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
This commit is contained in:
parent
8f83afcf49
commit
e9d66e904f
|
@ -114,12 +114,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-slice {
|
|
||||||
height: calc(100% - 32px);
|
|
||||||
overflow: auto;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
@dot-diameter: 4px;
|
@dot-diameter: 4px;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { debounce } from 'lodash';
|
||||||
import { max as d3Max } from 'd3-array';
|
import { max as d3Max } from 'd3-array';
|
||||||
import { AsyncCreatableSelect, CreatableSelect } from 'src/components/Select';
|
import { AsyncCreatableSelect, CreatableSelect } from 'src/components/Select';
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import { t, styled, SupersetClient } from '@superset-ui/core';
|
import { t, SupersetClient } from '@superset-ui/core';
|
||||||
|
|
||||||
import { BOOL_FALSE_DISPLAY, BOOL_TRUE_DISPLAY } from 'src/constants';
|
import { BOOL_FALSE_DISPLAY, BOOL_TRUE_DISPLAY } from 'src/constants';
|
||||||
import FormLabel from 'src/components/FormLabel';
|
import FormLabel from 'src/components/FormLabel';
|
||||||
|
@ -95,13 +95,6 @@ const defaultProps = {
|
||||||
instantFiltering: false,
|
instantFiltering: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Styles = styled.div`
|
|
||||||
height: 100%;
|
|
||||||
min-height: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
overflow: visible;
|
|
||||||
`;
|
|
||||||
|
|
||||||
class FilterBox extends React.PureComponent {
|
class FilterBox extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -427,9 +420,9 @@ class FilterBox extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { instantFiltering } = this.props;
|
const { instantFiltering, width, height } = this.props;
|
||||||
return (
|
return (
|
||||||
<Styles>
|
<div style={{ width, height, overflow: 'auto' }}>
|
||||||
{this.renderDateFilter()}
|
{this.renderDateFilter()}
|
||||||
{this.renderDatasourceFilters()}
|
{this.renderDatasourceFilters()}
|
||||||
{this.renderFilters()}
|
{this.renderFilters()}
|
||||||
|
@ -443,7 +436,7 @@ class FilterBox extends React.PureComponent {
|
||||||
{t('Apply')}
|
{t('Apply')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</Styles>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ export default function transformProps(chartProps) {
|
||||||
queriesData,
|
queriesData,
|
||||||
rawDatasource,
|
rawDatasource,
|
||||||
rawFormData,
|
rawFormData,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
} = chartProps;
|
} = chartProps;
|
||||||
const {
|
const {
|
||||||
onAddFilter = NOOP,
|
onAddFilter = NOOP,
|
||||||
|
@ -53,6 +55,8 @@ export default function transformProps(chartProps) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
chartId: sliceId,
|
chartId: sliceId,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
datasource: rawDatasource,
|
datasource: rawDatasource,
|
||||||
filtersChoices: queriesData[0].data,
|
filtersChoices: queriesData[0].data,
|
||||||
filtersFields,
|
filtersFields,
|
||||||
|
|
Loading…
Reference in New Issue