You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2022/01/12 20:54:18 UTC
[superset] 03/06: Check validity of control item (#17349)
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a222ba8e06e86ff47845be3fee6953379a8b3b7d
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Fri Nov 5 12:56:03 2021 +0200
Check validity of control item (#17349)
(cherry picked from commit d0085b1b29386a72b467d93494ba9fd5502eded4)
---
superset-frontend/src/explore/controlUtils/getControlState.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/explore/controlUtils/getControlState.ts b/superset-frontend/src/explore/controlUtils/getControlState.ts
index d679972..ae0cbf5 100644
--- a/superset-frontend/src/explore/controlUtils/getControlState.ts
+++ b/superset-frontend/src/explore/controlUtils/getControlState.ts
@@ -29,6 +29,7 @@ import {
ControlState,
ControlType,
ControlValueValidator,
+ CustomControlItem,
} from '@superset-ui/chart-controls';
import { getSectionsToRender } from './getSectionsToRender';
import { getControlConfig } from './getControlConfig';
@@ -160,8 +161,8 @@ export function getAllControlsState(
const controlsState = {};
getSectionsToRender(vizType, datasourceType).forEach(section =>
section.controlSetRows.forEach(fieldsetRow =>
- fieldsetRow.forEach(field => {
- if (field && 'config' in field && field.config && field.name) {
+ fieldsetRow.forEach((field: CustomControlItem) => {
+ if (field && field.config && field.name) {
const { config, name } = field;
controlsState[name] = getControlStateFromControlConfig(
config,