mirror of https://github.com/buster-so/buster.git
Update EditAxisLabelRotation.tsx
This commit is contained in:
parent
905d5fb48c
commit
b43b32fbde
|
@ -17,7 +17,7 @@ export const EditAxisLabelRotation: React.FC<{
|
||||||
}> = React.memo(({ xAxisLabelRotation, onChangeLabelRotation }) => {
|
}> = React.memo(({ xAxisLabelRotation, onChangeLabelRotation }) => {
|
||||||
const selectedOption: IBusterMetricChartConfig['xAxisLabelRotation'] = useMemo(() => {
|
const selectedOption: IBusterMetricChartConfig['xAxisLabelRotation'] = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
options.find((option) => option.value === xAxisLabelRotation)?.value || options[0]?.value!
|
options.find((option) => option.value === xAxisLabelRotation)?.value ?? options[0]?.value!
|
||||||
);
|
);
|
||||||
}, [xAxisLabelRotation]);
|
}, [xAxisLabelRotation]);
|
||||||
|
|
||||||
|
@ -25,8 +25,10 @@ export const EditAxisLabelRotation: React.FC<{
|
||||||
onChangeLabelRotation(value.value as IBusterMetricChartConfig['xAxisLabelRotation']);
|
onChangeLabelRotation(value.value as IBusterMetricChartConfig['xAxisLabelRotation']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(selectedOption, xAxisLabelRotation);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LabelAndInput label="Axis scale">
|
<LabelAndInput label="Axis orientation">
|
||||||
<AppSegmented
|
<AppSegmented
|
||||||
block
|
block
|
||||||
options={options as SegmentedItem<string>[]}
|
options={options as SegmentedItem<string>[]}
|
||||||
|
|
Loading…
Reference in New Issue