From b43b32fbde0038edc2ffeafb4769e24a7e102d85 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Mon, 31 Mar 2025 15:03:03 -0600 Subject: [PATCH] Update EditAxisLabelRotation.tsx --- .../SelectAxisSettingsContent/EditAxisLabelRotation.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx index 11acbacfb..73fc07012 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx @@ -17,7 +17,7 @@ export const EditAxisLabelRotation: React.FC<{ }> = React.memo(({ xAxisLabelRotation, onChangeLabelRotation }) => { const selectedOption: IBusterMetricChartConfig['xAxisLabelRotation'] = useMemo(() => { return ( - options.find((option) => option.value === xAxisLabelRotation)?.value || options[0]?.value! + options.find((option) => option.value === xAxisLabelRotation)?.value ?? options[0]?.value! ); }, [xAxisLabelRotation]); @@ -25,8 +25,10 @@ export const EditAxisLabelRotation: React.FC<{ onChangeLabelRotation(value.value as IBusterMetricChartConfig['xAxisLabelRotation']); }); + console.log(selectedOption, xAxisLabelRotation); + return ( - + []}