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