tagging in React Dropdown Component Development
Budget: $10 – $30 USD
Hi,
for reason drop down when it has Account support value it should pass data track value as Reason_Account Support
for sub-reason drop down when it has autopay value it should pass as sub-reason_Autopay. Providing the code below
{
selectedType &&
(selectedType === 'General' ||
selectedType.codeLabel === 'General' ||
selectedType === 'Lead' ||
selectedType.codeLabel === 'Lead') &&
!isEmpty(typeDropdownData) && (
<div>
<Label>Reason</Label>
<Dropdown
name="generalReason"
className="type-select"
size="small"
value={selectedGeneralReason}
placeholder={
!haveGeneralReason
? 'N/A'
: selectedGeneralReason && selectedGeneralReason.repDesc
}
onChange={this.props.onGeneralReasonsChange}
options={this.props.moddedReasonDropDown}
optionLabel="customerDesc"
optionValue="code"
data-track={`Reason_Account ${selectedGeneralReason}`}
/>
</div>
);
}
{
selectedType &&
(selectedType === 'General' ||
selectedType.codeLabel === 'General' ||
selectedType === 'Lead' ||
selectedType.codeLabel === 'Lead') &&
!isEmpty(typeDropdownData) && (
<div>
<Label>Sub-reason</Label>
<Dropdown
name="generalReason"
className="type-select"
size="small"
disabled={isEmpty(subReasons)}
value={isEmpty(subReasons) ? '' : selectedSubReason}
placeholder={isEmpty(subReasons) ? 'N/A' : selectedSubReason.repDesc}
onChange={this.props.onSubReasonsChange}
options={subReasons}
optionLabel="customerDesc"
optionValue="code"
data-track={`Sub-reason_Autopay ${
isEmpty(subReasons) ? '' : selectedSubReason
}`}
/>
</div>
);
}
for reason drop down when it has Account support value it should pass data track value as Reason_Account Support
for sub-reason drop down when it has autopay value it should pass as sub-reason_Autopay. Providing the code below
{
selectedType &&
(selectedType === 'General' ||
selectedType.codeLabel === 'General' ||
selectedType === 'Lead' ||
selectedType.codeLabel === 'Lead') &&
!isEmpty(typeDropdownData) && (
<div>
<Label>Reason</Label>
<Dropdown
name="generalReason"
className="type-select"
size="small"
value={selectedGeneralReason}
placeholder={
!haveGeneralReason
? 'N/A'
: selectedGeneralReason && selectedGeneralReason.repDesc
}
onChange={this.props.onGeneralReasonsChange}
options={this.props.moddedReasonDropDown}
optionLabel="customerDesc"
optionValue="code"
data-track={`Reason_Account ${selectedGeneralReason}`}
/>
</div>
);
}
{
selectedType &&
(selectedType === 'General' ||
selectedType.codeLabel === 'General' ||
selectedType === 'Lead' ||
selectedType.codeLabel === 'Lead') &&
!isEmpty(typeDropdownData) && (
<div>
<Label>Sub-reason</Label>
<Dropdown
name="generalReason"
className="type-select"
size="small"
disabled={isEmpty(subReasons)}
value={isEmpty(subReasons) ? '' : selectedSubReason}
placeholder={isEmpty(subReasons) ? 'N/A' : selectedSubReason.repDesc}
onChange={this.props.onSubReasonsChange}
options={subReasons}
optionLabel="customerDesc"
optionValue="code"
data-track={`Sub-reason_Autopay ${
isEmpty(subReasons) ? '' : selectedSubReason
}`}
/>
</div>
);
}