diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index c9b36ecf..2e871c55 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -1006,6 +1006,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R const groupArray = nestedList.filter(item => item?.child?.some(e => e?.id) ) + if(groupArray[0].child && previousSelectedValue !== selectedValue?.label && groupArray[0]?.uid === rowIndex){ for(const item of groupArray[0].child){ deletedExstingField[item?.uid] = { @@ -1316,7 +1317,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R } } - const selectedOption = OptionsForRow.length; + const selectedOption = OptionsForRow?.filter((option) => !option?.isDisabled)?.length // Handle case where there is exactly one match and it is auto-mapped if(OptionsForRow.length === 1 && @@ -1415,7 +1416,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R isDisabled: false }; - const adjustedOptions = (OptionsForRow.length === 0 && !contentTypeSchema) ? option : + const adjustedOptions: OptionsType[] | OptionsType = (OptionsForRow.length === 0 && !contentTypeSchema) ? option : (OptionsForRow.length > 0 && OptionsForRow.every((item)=>item.isDisabled) && OptionValue.label === Fields[data?.contentstackFieldType]?.label) ? [] : OptionsForRow.map((option: OptionsType) => ({ ...option, diff --git a/ui/src/components/LogScreen/index.tsx b/ui/src/components/LogScreen/index.tsx index af1ad0e3..1370695a 100644 --- a/ui/src/components/LogScreen/index.tsx +++ b/ui/src/components/LogScreen/index.tsx @@ -184,25 +184,25 @@ const TestMigrationLogViewer = ({ serverPath, sendDataToParent,projectId }: Logs transition: "transform 0.1s ease" }}> {logs?.map((log, index) => { - const key = `${index}-${new Date().getMilliseconds()}` + // const key = `${index}-${new Date().getMilliseconds()}` try { const logObject = JSON.parse(log); const level = logObject.level; const timestamp = logObject.timestamp; const message = logObject.message; return ( - <> +
{message === "Migration logs will appear here once the process begins." - ?
+ ?
{message}
- :
+ :
{index}
{ timestamp ? new Date(timestamp)?.toTimeString()?.split(' ')[0] : new Date()?.toTimeString()?.split(' ')[0]}
{message}
} - +
); } catch (error) { console.error('Invalid JSON string', error);