Skip to content

Commit 3ab52a8

Browse files
committed
bugfix: removed the extra call to fetch the mapper data and added advance field in the updated fields of handleResetContentType func
1 parent f99d79a commit 3ab52a8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ui/src/components/ContentMapper/contentMapper.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export interface Advanced {
8989
referenedItems?: string[];
9090
title?: string;
9191
url?: string;
92+
initial?: Omit<Advanced, 'initial'>;
9293
}
9394

9495
export interface ItemStatus {

ui/src/components/ContentMapper/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,11 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
20272027
contentstackFieldType: row?.backupFieldType,
20282028
contentstackField: row?.otherCmsField,
20292029
contentstackFieldUid: row?.backupFieldUid,
2030-
2030+
advanced: {
2031+
validationRegex: row?.advanced?.initial?.validationRegex ?? '',
2032+
...row?.advanced?.initial,
2033+
},
2034+
refrenceTo: []
20312035
};
20322036
});
20332037
setTableData(updatedRows);
@@ -2107,8 +2111,6 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
21072111
setContentTypes(resetContentTypes);
21082112
setCount(filteredCT?.length);
21092113

2110-
await fetchFields(selectedContentType?.id ?? '', searchText || '');
2111-
21122114
Notification({
21132115
notificationContent: { text: data?.message },
21142116
notificationProps: {

0 commit comments

Comments
 (0)