Skip to content

Commit 49880db

Browse files
Merge pull request #830 from contentstack/bugfix/aem-752
bugfix-Advance field reset
2 parents f99d79a + 431e12b commit 49880db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface FieldMapType {
7171
}
7272

7373
export interface Advanced {
74-
validationRegex: string;
74+
validationRegex?: string;
7575
mandatory?: boolean;
7676
multiple?: boolean;
7777
unique?: boolean;
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,9 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
20272027
contentstackFieldType: row?.backupFieldType,
20282028
contentstackField: row?.otherCmsField,
20292029
contentstackFieldUid: row?.backupFieldUid,
2030-
2030+
advanced: {
2031+
...row?.advanced?.initial,
2032+
},
20312033
};
20322034
});
20332035
setTableData(updatedRows);
@@ -2107,8 +2109,6 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
21072109
setContentTypes(resetContentTypes);
21082110
setCount(filteredCT?.length);
21092111

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

0 commit comments

Comments
 (0)