From 33198abcfb29b882c5d679e824fb16da72365be7 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Thu, 6 May 2021 15:24:41 +0300 Subject: [PATCH] fix(plugin-chart-table): check if control values are set (#1095) --- .../plugins/plugin-chart-table/src/controlPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-table/src/controlPanel.tsx index e2b840d05b19b..d8596ca318517 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-table/src/controlPanel.tsx @@ -198,7 +198,7 @@ const config: ControlPanelConfig = { name: 'row_limit', override: { visibility: ({ controls }: ControlPanelsContainerProps) => - !controls.server_pagination.value, + !controls?.server_pagination?.value, }, }, { @@ -211,7 +211,7 @@ const config: ControlPanelConfig = { choices: PAGE_SIZE_OPTIONS, description: t('Rows per page, 0 means no pagination'), visibility: ({ controls }: ControlPanelsContainerProps) => - Boolean(controls.server_pagination.value), + Boolean(controls?.server_pagination?.value), }, }, ], @@ -287,7 +287,7 @@ const config: ControlPanelConfig = { choices: PAGE_SIZE_OPTIONS, description: t('Rows per page, 0 means no pagination'), visibility: ({ controls }: ControlPanelsContainerProps) => - !controls.server_pagination.value, + !controls?.server_pagination?.value, }, }, null,