Adding spinner to unloaded form (data or schema)

This commit is contained in:
2025-04-21 01:29:45 +02:00
parent c90acc2765
commit 3fbb82642b

View File

@@ -6,6 +6,7 @@ import { jsonschemaProvider } from "../providers/jsonschema-provider";
import { useForm } from "@refinedev/core";
import CrudTextWidget from "./widgets/crud-text-widget";
import UnionEnumField from "./fields/union-enum";
import { CircularProgress } from "@mui/material";
type CrudFormProps = {
schemaName: string,
@@ -54,6 +55,11 @@ export const CrudForm: React.FC<CrudFormProps> = (props) => {
fetchSchema();
}, []);
if(formLoading || loading) {
return <CircularProgress />
}
return (
<Form
schema={schema}