Small front corrections
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user