Longform fields support for JSON string (#9666)
This commit is contained in:
parent
27b7e8f02c
commit
ee054adf39
|
@ -25,8 +25,8 @@
|
|||
const getOptions = (schema, type) => {
|
||||
let entries = Object.entries(schema ?? {})
|
||||
let types = []
|
||||
if (type === "field/options") {
|
||||
// allow options to be used on both options and string fields
|
||||
if (type === "field/options" || type === "field/longform") {
|
||||
// allow options and longform to be used on string fields as well
|
||||
types = [type, "field/string"]
|
||||
} else {
|
||||
types = [type]
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
</Skeleton>
|
||||
{:else if !fieldState}
|
||||
<Placeholder />
|
||||
{:else if schemaType && schemaType !== type && type !== "options"}
|
||||
{:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)}
|
||||
<Placeholder
|
||||
text="This Field setting is the wrong data type for this component"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue