diff --git a/app/configurator/components/field.tsx b/app/configurator/components/field.tsx index 51c7839c4..968dc0aa6 100644 --- a/app/configurator/components/field.tsx +++ b/app/configurator/components/field.tsx @@ -1,4 +1,6 @@ import { t } from "@lingui/macro"; +import { CircularProgress, Theme } from "@mui/material"; +import { makeStyles } from "@mui/styles"; import { extent, timeFormat, TimeLocaleObject, timeParse } from "d3"; import get from "lodash/get"; import { ChangeEvent, ReactNode, useCallback, useMemo, useState } from "react"; @@ -53,6 +55,15 @@ import { IconName } from "@/icons"; import { useLocale } from "@/locales/use-locale"; import { getPalette } from "@/palettes"; +const useStyles = makeStyles((theme) => ({ + loadingIndicator: { + color: theme.palette.grey[700], + display: "inline-block", + marginTop: theme.spacing(1), + marginLeft: theme.spacing(2), + }, +})); + export const ControlTabField = ({ component, value, @@ -625,7 +636,8 @@ export const ChartFieldField = ({ optional?: boolean; disabled?: boolean; }) => { - const fieldProps = useChartFieldField({ field }); + const classes = useStyles(); + const { fetching, ...fieldProps } = useChartFieldField({ field }); const noneLabel = t({ id: "controls.dimension.none", @@ -641,8 +653,21 @@ export const ChartFieldField = ({