Add new workflow parameter type in UI, credential (#1897)
This commit is contained in:
@@ -5,6 +5,7 @@ import { CodeEditor } from "./components/CodeEditor";
|
||||
import { AutoResizingTextarea } from "@/components/AutoResizingTextarea/AutoResizingTextarea";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { WorkflowParameterValueType } from "./types/workflowTypes";
|
||||
import { CredentialSelector } from "./components/CredentialSelector";
|
||||
|
||||
type Props = {
|
||||
type: WorkflowParameterValueType;
|
||||
@@ -80,6 +81,16 @@ function WorkflowParameterInput({ type, value, onChange }: Props) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (type === "credential_id") {
|
||||
const credentialId = value as string | null;
|
||||
return (
|
||||
<CredentialSelector
|
||||
value={credentialId ?? ""}
|
||||
onChange={(value) => onChange(value)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export { WorkflowParameterInput };
|
||||
|
||||
Reference in New Issue
Block a user