remove child of sub flow instead of flow itself (#2069)

fixes: #1963
This commit is contained in:
Erik Jan de Wit 2022-02-16 20:04:43 +01:00 committed by GitHub
parent f8b3595344
commit 5413a87011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -396,7 +396,7 @@ export default function FlowDetails() {
addExecution(execution.displayName!, type) addExecution(execution.displayName!, type)
} }
onAddFlow={(flow) => addFlow(execution.displayName!, flow)} onAddFlow={(flow) => addFlow(execution.displayName!, flow)}
onDelete={() => { onDelete={(execution) => {
setSelectedExecution(execution); setSelectedExecution(execution);
toggleDeleteDialog(); toggleDeleteDialog();
}} }}

View file

@ -35,7 +35,7 @@ type FlowRowProps = {
type: AuthenticationProviderRepresentation type: AuthenticationProviderRepresentation
) => void; ) => void;
onAddFlow: (flow: Flow) => void; onAddFlow: (flow: Flow) => void;
onDelete: () => void; onDelete: (execution: ExpandableExecution) => void;
}; };
export const FlowRow = ({ export const FlowRow = ({
@ -114,7 +114,7 @@ export const FlowRow = ({
<Button <Button
variant="plain" variant="plain"
aria-label={t("common:delete")} aria-label={t("common:delete")}
onClick={onDelete} onClick={() => onDelete(execution)}
> >
<TrashIcon /> <TrashIcon />
</Button> </Button>
@ -135,7 +135,7 @@ export const FlowRow = ({
onRowChange={onRowChange} onRowChange={onRowChange}
onAddExecution={onAddExecution} onAddExecution={onAddExecution}
onAddFlow={onAddFlow} onAddFlow={onAddFlow}
onDelete={onDelete} onDelete={() => onDelete(execution)}
/> />
))} ))}
</> </>