refactor: remove queryFields in QueryObject and update chart control configs (#12091)

* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
This commit is contained in:
Jesse Yang
2020-12-22 17:10:19 -08:00
committed by GitHub
parent de61859e98
commit d2da25a621
19 changed files with 328 additions and 2544 deletions

View File

@@ -91,6 +91,6 @@ describe('ControlPanelsContainer', () => {
it('renders ControlPanelSections', () => {
wrapper = shallow(<ControlPanelsContainer {...getDefaultProps()} />);
expect(wrapper.find(ControlPanelSection)).toHaveLength(6);
expect(wrapper.find(ControlPanelSection)).toHaveLength(5);
});
});

View File

@@ -21,9 +21,7 @@ import { getChartControlPanelRegistry, t } from '@superset-ui/core';
import {
getControlConfig,
getControlState,
getFormDataFromControls,
applyMapStateToPropsToControl,
getAllControlsState,
findControlItem,
} from 'src/explore/controlUtils';
import {
@@ -198,18 +196,6 @@ describe('controlUtils', () => {
});
});
describe('queryFields', () => {
it('in formData', () => {
const controlsState = getAllControlsState('table', 'table', {}, {});
const formData = getFormDataFromControls(controlsState);
expect(formData.queryFields).toEqual({
all_columns: 'columns',
metric: 'metrics',
metrics: 'metrics',
});
});
});
describe('findControlItem', () => {
it('find control as a string', () => {
const controlItem = findControlItem(

View File

@@ -83,7 +83,6 @@ export const controlPanelSectionsChartOptionsTable = [
name: 'all_columns',
config: {
type: 'SelectControl',
queryField: 'columns',
multi: true,
label: t('Columns'),
default: [],