opening modal when adding new parallel node
This commit is contained in:
1 parent
0e4e4783fa
commit
a1ca9d62b7
2 files changed
+13
-21
No files matched your search
@@ -591,18 +591,19 @@ export const makeParallelNodes = makeSpecialNodeMaker(
|
||||
{
|
||||
icon: <Add />,
|
||||
onClick: () =>
|
||||
args.stateUpdater.basic.sequence.updateNode(
|
||||
{
|
||||
...node,
|
||||
parallel: [
|
||||
...node.parallel,
|
||||
args.openModal({
|
||||
allowedTypes: ["condition", "action"],
|
||||
node: args.stateUpdater.basic.sequence.defaultNode,
|
||||
saveBtnCreateText: true,
|
||||
update: (n) =>
|
||||
args.stateUpdater.basic.sequence.updateNode(
|
||||
{
|
||||
sequence: [],
|
||||
...node,
|
||||
parallel: [...node.parallel, n],
|
||||
},
|
||||
],
|
||||
},
|
||||
args.nodeIndex
|
||||
),
|
||||
args.nodeIndex
|
||||
),
|
||||
}),
|
||||
}
|
||||
);
|
||||
outputState.addNode(addBtn);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import InputYaml from "components/Inputs/InputYaml";
|
||||
import { ParallelAction } from "types/automations/actions";
|
||||
import { OptionManager } from "./OptionManager";
|
||||
|
||||
@@ -8,15 +7,7 @@ export const ActionParallelState: OptionManager<ParallelAction> = {
|
||||
parallel: [],
|
||||
}),
|
||||
isReady: () => true,
|
||||
Component: ({ state, setState }) => {
|
||||
return (
|
||||
<>
|
||||
<InputYaml
|
||||
label="Actions"
|
||||
value={state.parallel ?? []}
|
||||
onChange={(parallel) => setState({ ...state, parallel })}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
Component: () => {
|
||||
return <></>;
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user