From 44ccecd5daeb16841bcc8c9d985773bff7e38268 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 15:24:35 +0100 Subject: [PATCH] fix: filter visibility issue --- src/vis/bar/BarVisSidebar.tsx | 11 ++--------- src/vis/scatter/ScatterVisSidebar.tsx | 10 +--------- src/vis/violin/ViolinVisSidebar.tsx | 10 +--------- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/vis/bar/BarVisSidebar.tsx b/src/vis/bar/BarVisSidebar.tsx index 66cb47382..1f53f47a1 100644 --- a/src/vis/bar/BarVisSidebar.tsx +++ b/src/vis/bar/BarVisSidebar.tsx @@ -96,15 +96,8 @@ export function BarVisSidebar({ setConfig({ ...config, direction })} currentSelected={config.direction} /> ) : null} - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); } diff --git a/src/vis/scatter/ScatterVisSidebar.tsx b/src/vis/scatter/ScatterVisSidebar.tsx index 3addd9f5a..fcdeb2960 100644 --- a/src/vis/scatter/ScatterVisSidebar.tsx +++ b/src/vis/scatter/ScatterVisSidebar.tsx @@ -68,15 +68,7 @@ export function ScatterVisSidebar({ config, optionsConfig, columns, filterCallba currentValue={config.alphaSliderVal} /> - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); } diff --git a/src/vis/violin/ViolinVisSidebar.tsx b/src/vis/violin/ViolinVisSidebar.tsx index d8596af31..3452015df 100644 --- a/src/vis/violin/ViolinVisSidebar.tsx +++ b/src/vis/violin/ViolinVisSidebar.tsx @@ -54,15 +54,7 @@ export function ViolinVisSidebar({ ) : null} - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); }