Merge branch 'zustand/io/migration' of personal:logspace-ai/langflow into zustand/io/migration
This commit is contained in:
commit
45d4610812
4 changed files with 10 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import { Textarea } from "../ui/textarea";
|
|||
export default function IOInputField({
|
||||
inputType,
|
||||
inputId,
|
||||
left,
|
||||
}: IOInputProps): JSX.Element | undefined {
|
||||
const nodes = useFlowStore((state) => state.nodes);
|
||||
const setNode = useFlowStore((state) => state.setNode);
|
||||
|
|
@ -17,7 +18,7 @@ export default function IOInputField({
|
|||
case "TextInput":
|
||||
return (
|
||||
<Textarea
|
||||
className="w-full"
|
||||
className={`w-full ${left ? "" : " h-full"}`}
|
||||
placeholder={"Enter text..."}
|
||||
value={node.data.node!.template["input_value"].value}
|
||||
onChange={(e) => {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { Textarea } from "../ui/textarea";
|
|||
export default function IOOutputView({
|
||||
outputType,
|
||||
outputId,
|
||||
left,
|
||||
}: IOOutputProps): JSX.Element | undefined {
|
||||
const nodes = useFlowStore((state) => state.nodes);
|
||||
const setNode = useFlowStore((state) => state.setNode);
|
||||
|
|
@ -17,7 +18,7 @@ export default function IOOutputView({
|
|||
case "TextOutput":
|
||||
return (
|
||||
<Textarea
|
||||
className="w-full custom-scroll"
|
||||
className={`w-full custom-scroll ${left ? "" : " h-full"}`}
|
||||
placeholder={"Empty"}
|
||||
// update to real value on flowPool
|
||||
value={
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ export default function IOView({ children, open, setOpen, disable }: {
|
|||
<div className="">
|
||||
{input && (
|
||||
<IOInputField
|
||||
left={true}
|
||||
inputType={input.type}
|
||||
inputId={input.id}
|
||||
/>
|
||||
|
|
@ -265,6 +266,7 @@ export default function IOView({ children, open, setOpen, disable }: {
|
|||
<div className="">
|
||||
{output && (
|
||||
<IOOutputView
|
||||
left={true}
|
||||
outputType={output.type}
|
||||
outputId={output.id}
|
||||
/>
|
||||
|
|
@ -303,11 +305,13 @@ export default function IOView({ children, open, setOpen, disable }: {
|
|||
(input) => input.id === selectedViewField.id
|
||||
) ? (
|
||||
<IOInputField
|
||||
left={false}
|
||||
inputType={selectedViewField.type!}
|
||||
inputId={selectedViewField.id!}
|
||||
/>
|
||||
) : (
|
||||
<IOOutputView
|
||||
left={false}
|
||||
outputType={selectedViewField.type!}
|
||||
outputId={selectedViewField.id!}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -670,10 +670,12 @@ export type dropdownButtonPropsType = {
|
|||
export type IOInputProps = {
|
||||
inputType: string;
|
||||
inputId: string;
|
||||
left?: boolean;
|
||||
};
|
||||
export type IOOutputProps = {
|
||||
outputType: string;
|
||||
outputId: string;
|
||||
left?: boolean;
|
||||
};
|
||||
|
||||
export type IOFileInputProps = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue