Skip to content

Commit

Permalink
bugfix/fwf-4089-Hide-default-task-var (#2439)
Browse files Browse the repository at this point in the history
* bugfix/fwf-4089-Hide-default-task-var

* used set for improved readability
  • Loading branch information
fahad-aot authored Dec 18, 2024
1 parent 2562d8f commit e71c949
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions forms-flow-web/src/components/Modals/TaskVariableModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ import {
//TBD in case of Bundle form display
const PillList = React.memo(({ alternativeLabels, onRemove }) => {
const { t } = useTranslation();
// Filter out applicationId and applicationStatus
const ignoreKeywords = new Set(["applicationId", "applicationStatus"]);
const filteredVariablePills = Object.values(alternativeLabels).filter(
({ key }) => !ignoreKeywords.has(key)
);
return (
<div className="pill-container">
{Object.values(alternativeLabels).length ? (
Object.values(alternativeLabels).map(
{filteredVariablePills.length ? (
filteredVariablePills.map(
({key, altVariable, labelOfComponent }) => (
<CustomPill
key={key}
label={altVariable || labelOfComponent}
icon={(key !== "applicationId" && key !== "applicationStatus") && <CloseIcon color="#253DF4" data-testid="pill-remove-icon" />}
icon={<CloseIcon color="#253DF4" data-testid="pill-remove-icon" />}
bg="#E7E9FE"
onClick={() => onRemove(key)}
secondaryLabel={key}
Expand Down

0 comments on commit e71c949

Please sign in to comment.