diff --git a/web/src/components/features/popups/SaveResetFilePopup.tsx b/web/src/components/features/popups/SaveResetFilePopup.tsx index 7a2e6aa75..bcb90c169 100644 --- a/web/src/components/features/popups/SaveResetFilePopup.tsx +++ b/web/src/components/features/popups/SaveResetFilePopup.tsx @@ -8,10 +8,11 @@ export const SaveResetFilePopup: React.FC<{ open: boolean; onReset: () => void; onSave: () => void; -}> = React.memo(({ open, onReset, onSave }) => { + isSaving: boolean; +}> = React.memo(({ open, onReset, onSave, isSaving = false }) => { return ( - + ); }); @@ -19,7 +20,8 @@ export const SaveResetFilePopup: React.FC<{ const SplitterContent: React.FC<{ onReset: () => void; onSave: () => void; -}> = React.memo(({ onReset, onSave }) => { + isSaving: boolean; +}> = React.memo(({ onReset, onSave, isSaving }) => { return (
@@ -35,6 +37,7 @@ const SplitterContent: React.FC<{ className="flex items-center" variant="black" onClick={onSave} + loading={isSaving} suffix={
diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx index 6a14cce22..c03b69a1e 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx @@ -22,7 +22,7 @@ export const SelectAxisItemLabel = React.memo( return formatLabel(id, columnLabelFormat, true); }, [columnLabelFormat, id]); - const Icon = useMemo(() => ColumnTypeIcon[style], [style]); + const Icon = useMemo(() => ColumnTypeIcon[style] || ColumnTypeIcon.string, [style]); return (
= React.memo(({ metricId file_name })); const { openSuccessMessage } = useBusterNotifications(); - const { mutateAsync: updateMetric, error: updateMetricError } = useSaveMetric(); + const { + mutateAsync: updateMetric, + isPending: isUpdatingMetric, + error: updateMetricError + } = useSaveMetric({ + updateOnSave: true + }); const updateMetricErrorMessage = updateMetricError?.message; @@ -49,7 +55,12 @@ export const MetricViewFile: React.FC = React.memo(({ metricId error={updateMetricErrorMessage} /> - +
); });