fix: display contentType text-area fields in list block

This commit is contained in:
abdou6666 2024-12-16 15:37:48 +01:00
parent 3b549b3e6e
commit 951ec19023

View File

@ -172,6 +172,7 @@ const ListMessageForm = () => {
<FormLabel component="h4" sx={{ marginBottom: "1rem" }}> <FormLabel component="h4" sx={{ marginBottom: "1rem" }}>
{t("title.fields_map")} {t("title.fields_map")}
</FormLabel> </FormLabel>
{/* here! */}
<ContentItem> <ContentItem>
<Controller <Controller
name="options.content.fields.title" name="options.content.fields.title"
@ -186,7 +187,9 @@ const ListMessageForm = () => {
return ( return (
<AutoCompleteSelect<ContentField, "label", false> <AutoCompleteSelect<ContentField, "label", false>
options={(contentType?.fields || []).filter( options={(contentType?.fields || []).filter(
({ type }) => ContentFieldType.TEXT === type, ({ type }) =>
ContentFieldType.TEXT === type ||
ContentFieldType.TEXTAREA === type,
)} )}
idKey="name" idKey="name"
labelKey="label" labelKey="label"
@ -214,7 +217,9 @@ const ListMessageForm = () => {
return ( return (
<AutoCompleteSelect<ContentField, "label", false> <AutoCompleteSelect<ContentField, "label", false>
options={(contentType?.fields || []).filter( options={(contentType?.fields || []).filter(
({ type }) => ContentFieldType.TEXT === type, ({ type }) =>
ContentFieldType.TEXT === type ||
ContentFieldType.TEXTAREA === type,
)} )}
idKey="name" idKey="name"
labelKey="label" labelKey="label"