Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export interface FieldMetadata {
allow_json_rte?: boolean;
}
export interface ContentTypesSchema {
display_type: string;
data_type?: 'text' | 'number' | 'isodate' | 'json' | 'file' | 'reference' | 'group' | 'boolean' | 'link';
display_name: string;
enum?: any;
Expand Down
16 changes: 7 additions & 9 deletions ui/src/components/ContentMapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -880,17 +880,13 @@ const ContentMapper = forwardRef(({projectData}: ContentMapperComponentProps, re

}
setIsFieldDeleted(true);
// console.log(deletedExstingField);

delete existingField[item?.uid]
const index = selectedOptions?.indexOf(existingField[item?.uid]?.value?.label);


const index = selectedOptions?.indexOf(`${item.contentstackField}`);
//console.log(index);
if(index > -1){
selectedOptions.slice(index,1 )
selectedOptions.splice(index,1 );

}

delete existingField[item?.uid]

}
}
Expand Down Expand Up @@ -1027,6 +1023,8 @@ const ContentMapper = forwardRef(({projectData}: ContentMapperComponentProps, re
return value?.data_type === 'json';
case 'enum':
return 'enum' in value;
case 'display_type':
return value?.display_type === 'dropdown';
case 'allow_rich_text':
return value?.field_metadata?.allow_rich_text === true;
case 'Group':
Expand Down Expand Up @@ -1151,7 +1149,7 @@ const ContentMapper = forwardRef(({projectData}: ContentMapperComponentProps, re
'link': 'link',
'reference': 'reference',
'dropdown': 'enum',
'Droplist': 'enum',
'Droplist': 'display_type',
'radio': 'enum'
};

Expand Down