From 733cacdddf7be59d4a7cf28c8430d97c0e74a9c8 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 28 Feb 2024 15:40:15 -0500 Subject: [PATCH] Minor state thing (not really used) No more internal min-height of 400px, up to the container of the chart to handle the work --- src/chart-style.ts | 1 - src/chart.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chart-style.ts b/src/chart-style.ts index 9471812..257be47 100644 --- a/src/chart-style.ts +++ b/src/chart-style.ts @@ -4,7 +4,6 @@ export const sxClasses = { mainContainer: { width: '100%', - minHeight: '400px', }, mainGeoChartContainer: {}, header: { diff --git a/src/chart.tsx b/src/chart.tsx index 7c6c6b8..29454fe 100644 --- a/src/chart.tsx +++ b/src/chart.tsx @@ -198,11 +198,11 @@ export function GeoChart< GeoChartDatasource | undefined, React.Dispatch ]; + const [action, setAction] = useState(parentAction) as [GeoChartAction, React.Dispatch]; const [redraw, setRedraw] = useState(parentAction?.shouldRedraw) as [boolean | undefined, React.Dispatch]; const [isLoadingDatasource, setIsLoadingDatasource] = useState(parentLoadingDatasource) as [boolean, React.Dispatch]; // Inner component states unrelated to the parent component - const [action, setAction] = useState() as [GeoChartAction, React.Dispatch]; const [datasetRegistry, setDatasetRegistry] = useState({}) as [GeoChartSelectedDataset, React.Dispatch]; const [datasRegistry, setDatasRegistry] = useState({}) as [GeoChartSelectedDataset, React.Dispatch]; const [filteredRecords, setFilteredRecords] = useState() as [TypeJsonObject[] | undefined, React.Dispatch];