Skip to content

Commit 873138b

Browse files
committed
chore: convert if-then cond to multirow-multicol
1 parent e4731ae commit 873138b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/backend/src/apps/toolbox/actions/if-then/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const action: IRawAction = {
4545
{
4646
label: 'Conditions',
4747
key: 'conditions',
48-
type: 'multirow' as const,
48+
type: 'multirow-multicol' as const,
4949
required: true,
5050
description:
5151
'Every condition has to be satisfied for this branch to be taken.',

packages/backend/src/apps/toolbox/common/get-condition-args.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IField } from '@plumber/types'
1+
import type { IFieldMultiRowMultiColSubField } from '@plumber/types'
22

33
interface GetConditionArgsOptions {
44
usePlaceholders: boolean
@@ -8,7 +8,7 @@ interface GetConditionArgsOptions {
88
// onlyContinueIf.
99
export default function getConditionArgs({
1010
usePlaceholders,
11-
}: GetConditionArgsOptions): IField[] {
11+
}: GetConditionArgsOptions): IFieldMultiRowMultiColSubField[] {
1212
const labelPropName = usePlaceholders ? 'placeholder' : 'label'
1313

1414
return [
@@ -18,6 +18,7 @@ export default function getConditionArgs({
1818
type: 'string' as const,
1919
required: true,
2020
variables: true,
21+
customStyle: { flex: 3 },
2122
},
2223
{
2324
[labelPropName]: 'Is or is not',
@@ -30,6 +31,7 @@ export default function getConditionArgs({
3031
{ label: 'Is', value: 'is' },
3132
{ label: 'Is not', value: 'not' },
3233
],
34+
customStyle: { flex: 2 },
3335
},
3436
{
3537
[labelPropName]: 'Condition',
@@ -73,6 +75,7 @@ export default function getConditionArgs({
7375
description: 'Used for dates',
7476
},
7577
],
78+
customStyle: { flex: 2 },
7679
},
7780
{
7881
[labelPropName]: 'Value',
@@ -85,6 +88,7 @@ export default function getConditionArgs({
8588
op: 'equals',
8689
fieldValue: 'empty',
8790
},
91+
customStyle: { flex: 3 },
8892
},
8993
]
9094
}

0 commit comments

Comments
 (0)