diff --git a/packages/libs/eda/src/lib/core/components/visualizations/implementations/LineplotVisualization.tsx b/packages/libs/eda/src/lib/core/components/visualizations/implementations/LineplotVisualization.tsx index af90bd616a..8329fdd6d1 100755 --- a/packages/libs/eda/src/lib/core/components/visualizations/implementations/LineplotVisualization.tsx +++ b/packages/libs/eda/src/lib/core/components/visualizations/implementations/LineplotVisualization.tsx @@ -71,7 +71,6 @@ import { CoverageStatistics } from '../../../types/visualization'; // import axis label unit util import { variableDisplayWithUnit } from '../../../utils/variable-display'; import { - NumberVariable, DateVariable, StudyEntity, Variable, @@ -477,8 +476,10 @@ function LineplotViz(props: VisualizationProps) { vizConfig.dependentAxisLogScale, vizConfig.independentAxisValueSpec, vizConfig.dependentAxisValueSpec, + vizConfig.useBinning, findEntityAndVariable, updateVizConfig, + showMarginalHistogram, ] ); @@ -1183,7 +1184,11 @@ function LineplotViz(props: VisualizationProps) { }); // add reset for truncation message: including dependent axis warning as well setTruncatedIndependentAxisWarning(''); - }, [updateVizConfig, setTruncatedIndependentAxisWarning]); + }, [ + updateVizConfig, + setTruncatedIndependentAxisWarning, + alwaysEnableUseBinning, + ]); const handleDependentAxisRangeChange = useCallback( (newRange?: NumberOrDateRange) => { @@ -1214,7 +1219,7 @@ function LineplotViz(props: VisualizationProps) { }); // add reset for truncation message as well setTruncatedDependentAxisWarning(''); - }, [updateVizConfig, categoricalMode]); + }, [updateVizConfig, setTruncatedDependentAxisWarning]); // set useEffect for changing truncation warning message useEffect(() => { diff --git a/packages/libs/eda/src/lib/core/hooks/cachedPromise.ts b/packages/libs/eda/src/lib/core/hooks/cachedPromise.ts index 6d387d7e65..80633f3d6c 100644 --- a/packages/libs/eda/src/lib/core/hooks/cachedPromise.ts +++ b/packages/libs/eda/src/lib/core/hooks/cachedPromise.ts @@ -33,13 +33,14 @@ export function useCachedPromise( // Mapping the state from useQuery to PromiseHookState // and return something stable + const isPending = isLoading || isFetching; const state: PromiseHookState = useMemo( () => ({ value: enabled ? data : undefined, - pending: enabled && (isLoading || isFetching), + pending: enabled && isPending, error: error, }), - [data, enabled, isLoading || isFetching, error] + [data, enabled, isPending, error] ); return state;