Small front corrections

This commit is contained in:
2025-04-20 13:58:32 +02:00
parent 2249791267
commit 8f950ed665
4 changed files with 9 additions and 8 deletions

View File

@@ -1,2 +1 @@
legacy-peer-deps=true
strict-peer-dependencies=false
legacy-peer-deps=true

View File

@@ -1,14 +1,18 @@
import {FormContextType, getTemplate, RJSFSchema, StrictRJSFSchema, WidgetProps} from "@rjsf/utils";
import React from "react";
import { FormContextType, getTemplate, RJSFSchema, WidgetProps } from "@rjsf/utils";
import Typography from "@mui/material/Typography";
import ForeignKeyWidget from "./foreign-key";
import Typography from "@mui/material/Typography";
export default function CrudTextWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
export type CrudTextRJSFSchema = RJSFSchema & { props? : any };
export default function CrudTextWidget<T = any, S extends CrudTextRJSFSchema = CrudTextRJSFSchema, F extends FormContextType = any>(
props: WidgetProps<T, S, F>
) {
const { schema } = props;
if (schema.hasOwnProperty("foreign_key")) {
return (<ForeignKeyWidget {...props} />);
return <ForeignKeyWidget {...props} />;
} else if (schema.hasOwnProperty("const")) {
return <Typography >{schema.const as string}</Typography>;
} else {

View File

@@ -12,8 +12,6 @@ const Edit = <T,>(props: EditProps) => {
const { schemaName, resource, uiSchema } = props;
const { record_id } = useParams();
console.log(record_id);
return (
<CrudForm
schemaName={schemaName}