Skip to content

Commit

Permalink
1515 - only show advanced properties if they match the displayConditi…
Browse files Browse the repository at this point in the history
…on (if they have a displayCondition)
  • Loading branch information
kresimir-coko authored and ivicac committed Nov 9, 2024
1 parent 41aad07 commit a427bb6
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@ const Properties = ({
}: PropertiesProps) => {
const {currentComponent} = useWorkflowNodeDetailsPanelStore();

const advancedProperties = properties.filter((property) => property.name && property.advancedOption);
const advancedProperties = properties.filter((property) => {
const {advancedOption, displayCondition, name} = property;

if (!name || !advancedOption) {
return false;
}

if (displayCondition && !currentComponent?.displayConditions?.[displayCondition]) {
return false;
}

return true;
});

const simpleProperties = properties.filter((property) => property.name && !property.advancedOption);

return (
Expand Down

0 comments on commit a427bb6

Please sign in to comment.