Skip to content

Commit 613e4a3

Browse files
authored
Merge pull request #471 from contentstack/feature/dropdown-field-choices
refactor:added referenced content type list in advanced property of r…
2 parents 3085bd6 + bc70670 commit 613e4a3

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

ui/src/components/AdvancePropertise/index.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
Icon,
1212
Select,
1313
Radio,
14-
Button
14+
Button,
15+
Tag
1516
} from '@contentstack/venus-components';
1617

1718
// Service
@@ -525,6 +526,20 @@ const AdvancePropertise = (props: SchemaProps) => {
525526
</Field>
526527
)}
527528

529+
{props?.fieldtype === 'Reference' && (
530+
<Field>
531+
<FieldLabel className="option-label" htmlFor="options" version="v2">
532+
Referenced Content Type
533+
</FieldLabel>
534+
<Tag
535+
tags={props?.data?.refrenceTo}
536+
isDisabled={true}
537+
version={'v2'}
538+
/>
539+
540+
</Field>
541+
)}
542+
528543
<Field>
529544
<FieldLabel className="option-label" htmlFor="options" version="v2">
530545
Other Options

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export interface FieldMapType {
6666
advanced?: Advanced;
6767
contentstackUid: string;
6868
_invalid?: boolean;
69-
backupFieldUid:string
69+
backupFieldUid:string;
70+
refrenceTo: string[]
7071

7172
}
7273

ui/src/components/ContentMapper/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,6 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
10811081
data?.otherCmsType === 'Group' ||
10821082
data?.otherCmsField === 'title' ||
10831083
data?.otherCmsField === 'url' ||
1084-
data?.otherCmsType === 'reference' ||
10851084
data?.contentstackFieldType === 'global_field' ||
10861085
data?.otherCmsType === undefined ||
10871086
data?.backupFieldType === 'extension' ||
@@ -1548,8 +1547,6 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
15481547
...option,
15491548
isDisabled: selectedOptions?.includes(option?.label ?? '')
15501549
}));
1551-
console.log("**** ", data?.backupFieldType,!OptionValue?.isDisabled , OptionValue?.label === 'Dropdown',
1552-
(data?.backupFieldType !== 'extension' && data?.backupFieldType !== 'app'));
15531550

15541551
return (
15551552
<div className="table-row">

0 commit comments

Comments
 (0)