Skip to content

Commit 7266dd4

Browse files
committed
added a delay when triggering the field deletion to temporarily fix an issue with field not being deleted properly
1 parent be51c88 commit 7266dd4

File tree

1 file changed

+8
-4
lines changed
  • src/apps/schema/src/app/components/AddFieldModal/views

1 file changed

+8
-4
lines changed

src/apps/schema/src/app/components/AddFieldModal/views/FieldForm.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,14 @@ export const FieldForm = ({
647647
fieldStateOnSaveAction === "deactivate" &&
648648
!fieldData?.deletedAt
649649
) {
650-
deleteContentModelField({
651-
modelZUID: id,
652-
fieldZUID: fieldData?.ZUID,
653-
});
650+
// added a delay to temporarily fix an issue with field not being deleted properly
651+
// likely related to api response caching
652+
setTimeout(() => {
653+
deleteContentModelField({
654+
modelZUID: id,
655+
fieldZUID: fieldData?.ZUID,
656+
});
657+
}, 1000);
654658
}
655659
})
656660
.catch((error) => {

0 commit comments

Comments
 (0)