Skip to content

Commit

Permalink
Proper fix for apache#11419
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Jan 13, 2021
1 parent 5ae7ae7 commit f2b0f07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@
}
}

.chart-slice {
height: calc(100% - 32px);
}

.dot {
@dot-diameter: 4px;

Expand Down
15 changes: 4 additions & 11 deletions superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { debounce } from 'lodash';
import { max as d3Max } from 'd3-array';
import { AsyncCreatableSelect, CreatableSelect } from 'src/components/Select';
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 FormLabel from 'src/components/FormLabel';
Expand Down Expand Up @@ -95,13 +95,6 @@ const defaultProps = {
instantFiltering: false,
};

const Styles = styled.div`
height: 100%;
min-height: 100%;
max-height: 100%;
overflow: visible;
`;

class FilterBox extends React.PureComponent {
constructor(props) {
super(props);
Expand Down Expand Up @@ -427,9 +420,9 @@ class FilterBox extends React.PureComponent {
}

render() {
const { instantFiltering } = this.props;
const { instantFiltering, width, height } = this.props;
return (
<Styles>
<div style={{ width, height, overflow: 'auto' }}>
{this.renderDateFilter()}
{this.renderDatasourceFilters()}
{this.renderFilters()}
Expand All @@ -443,7 +436,7 @@ class FilterBox extends React.PureComponent {
{t('Apply')}
</Button>
)}
</Styles>
</div>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export default function transformProps(chartProps) {
queriesData,
rawDatasource,
rawFormData,
width,
height,
} = chartProps;
const {
onAddFilter = NOOP,
Expand All @@ -53,6 +55,8 @@ export default function transformProps(chartProps) {

return {
chartId: sliceId,
width,
height,
datasource: rawDatasource,
filtersChoices: queriesData[0].data,
filtersFields,
Expand Down

0 comments on commit f2b0f07

Please sign in to comment.