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 @@ -63,7 +63,7 @@ export interface FieldMapType {
otherCmsType: string;
uid: string;
id: string;
_invalid?: boolean;
_canSelect?: boolean;
advanced:Advanced
}

Expand Down
10 changes: 4 additions & 6 deletions ui/src/components/ContentMapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ const ContentMapper = () => {
// Make title and url field non editable
useEffect(() => {
tableData?.forEach((field) => {
if (field?.otherCmsField === 'title' || field?.otherCmsField === 'url') {
field._invalid = true;
if (field?.otherCmsField !== 'title' && field?.otherCmsField !== 'url') {
field._canSelect = true;
}
});
})
Expand Down Expand Up @@ -255,8 +255,6 @@ const ContentMapper = () => {

// Method to search content types
const handleSearch = async (searchCT: string) => {
console.log("searchCT", searchCT);

setSearchContentType(searchCT)

const { data } = await getContentTypes(projectId, 0, 5, searchCT || ''); //org id will always present
Expand Down Expand Up @@ -591,7 +589,7 @@ const ContentMapper = () => {
maxWidth="290px"
isClearable={false}
options={option}
isDisabled={data?.ContentstackFieldType === "group"}
isDisabled={data?.ContentstackFieldType === "group" || data?.otherCmsField === 'title' || data?.otherCmsField === 'url'}
/>
</div>
<Tooltip content='Advance propertise' position='top'>
Expand All @@ -603,7 +601,6 @@ const ContentMapper = () => {
handleAdvancedSetting(data?.ContentstackFieldType, data?.advanced, data?.uid, data)
}
/>

</Tooltip>

</div>
Expand Down Expand Up @@ -1052,6 +1049,7 @@ const ContentMapper = () => {
showExportCta: true
}}
getSelectedRow={handleSelectedEntries}
rowSelectCheckboxProp={{ key: '_canSelect', value: true }}
/>
</div>

Expand Down