Feat: Allows users to delete a condition of a conditional operator #3221 (#9022)

### What problem does this PR solve?

Feat: Allows users to delete a condition of a conditional operator #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-24 15:30:28 +08:00
committed by GitHub
parent b47dcc9108
commit ae856b8faa
8 changed files with 57 additions and 37 deletions

View File

@ -78,14 +78,17 @@ function InnerSwitchNode({ id, data, selected }: NodeProps<ISwitchNode>) {
{positions.map((position, idx) => {
return (
<div key={idx}>
<section className="flex flex-col">
<div className="flex justify-between">
<span className="text-text-sub-title text-xs translate-y-2">
{idx < positions.length - 1 &&
position.condition?.logical_operator?.toUpperCase()}
</span>
<section className="flex flex-col text-xs">
<div className="text-right">
<span>{getConditionKey(idx, positions.length)}</span>
<div className="text-text-sub-title">
{idx < positions.length - 1 && position.text}
</div>
</div>
<span className="text-background-checked">
{idx < positions.length - 1 &&
position.condition?.logical_operator?.toUpperCase()}
</span>
{position.condition && (
<ConditionBlock
condition={position.condition}