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