diff --git a/editor.planx.uk/src/@planx/components/FileUpload/Editor.tsx b/editor.planx.uk/src/@planx/components/FileUpload/Editor.tsx index 49163aa9f0..25ddd29b2c 100644 --- a/editor.planx.uk/src/@planx/components/FileUpload/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/FileUpload/Editor.tsx @@ -9,8 +9,8 @@ import RichTextInput from "ui/editor/RichTextInput/RichTextInput"; import Input from "ui/shared/Input/Input"; import InputRow from "ui/shared/InputRow"; -import { ICONS } from "../shared/icons"; import { DataFieldAutocomplete } from "../shared/DataFieldAutocomplete"; +import { ICONS } from "../shared/icons"; function Component(props: any) { const formik = useFormik<{ @@ -43,8 +43,8 @@ function Component(props: any) { validate: () => { }, }); - // Rather than default to generic `useStore().geFlowSchema()` - // File Upload components can specificly reference ODP Schema enum options + // Rather than default to generic `useStore().getFlowSchema()` + // File Upload components can specifically reference ODP Schema enum options const schema = getValidSchemaValues("FileType"); return ( @@ -53,6 +53,7 @@ function Component(props: any) { - + formik.setFieldValue("fn", value)} + /> diff --git a/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx b/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx index 40111fadc6..6fd9a02242 100644 --- a/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx @@ -14,6 +14,8 @@ import InputRowItem from "ui/shared/InputRowItem"; import InputRowLabel from "ui/shared/InputRowLabel"; import { Switch } from "ui/shared/Switch"; +import { useStore } from "pages/FlowEditor/lib/store"; +import { DataFieldAutocomplete } from "../shared/DataFieldAutocomplete"; import { ICONS } from "../shared/icons"; export type Props = EditorProps; @@ -28,6 +30,9 @@ export default function NumberInputComponent(props: Props): FCReturn { }, validate: () => {}, }); + + const schema = useStore().getFlowSchema()?.nodes; + return (