dont initalise json with {} so that it can be configured to accepts arrays

This commit is contained in:
shamsmosowi
2021-09-20 12:05:34 +10:00
parent 6d38c0eb5a
commit 11f388bc5e
2 changed files with 2 additions and 8 deletions

View File

@@ -5,12 +5,7 @@ import { IMenuModalProps } from "..";
import { makeStyles, createStyles } from "@mui/styles";
import Switch from "@mui/material/Switch";
import FormControlLabel from "@mui/material/FormControlLabel";
import {
Typography,
TextField,
MenuItem,
ListItemText,
} from "@mui/material";
import { Typography, TextField, MenuItem, ListItemText } from "@mui/material";
import Subheading from "../Subheading";
import { getFieldProp } from "components/fields";
@@ -61,7 +56,6 @@ export default function DefaultValueInput({
config.defaultValue?.value ?? getFieldProp("initialValue", _type),
},
});
console.log(config);
return (
<>
<Subheading>Default Value</Subheading>

View File

@@ -20,7 +20,7 @@ export const config: IFieldConfig = {
name: "JSON",
group: "Code",
dataType: "any",
initialValue: {},
initialValue: undefined,
initializable: true,
icon: <JsonIcon />,
description: "JSON object editable with a visual JSON editor.",