Skip to content

Commit

Permalink
[Content] Filter out deleted fields in FieldForm dropdown options (#3227
Browse files Browse the repository at this point in the history
)

Filter out deleted fields in FieldForm dropdown options
Resolves #3212
  • Loading branch information
finnar-bin authored Feb 18, 2025
1 parent 9443e94 commit 2299cff
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ export const FieldForm = ({
?.sort((a, b) => a.label.localeCompare(b.label));
}, [allModels]);
const fieldsOptions: DropdownOptions[] = useMemo(() => {
return selectedModelFields?.map((field) => ({
label: field.label,
value: field.ZUID,
}));
return selectedModelFields
?.filter((field) => !field.deletedAt)
?.map((field) => ({
label: field.label,
value: field.ZUID,
}));
}, [selectedModelFields]);
const [
deleteContentModelField,
Expand Down

0 comments on commit 2299cff

Please sign in to comment.