mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -83,7 +83,6 @@ export const controlPanelSectionsChartOptionsTable = [
|
||||
name: 'all_columns',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
queryField: 'columns',
|
||||
multi: true,
|
||||
label: t('Columns'),
|
||||
default: [],
|
||||
|
||||
Reference in New Issue
Block a user