Add docs for field update, icon, and small fixes (#1459)
* Refactor code formatting and improve error handling in utils.py * Refactor parameterComponent to include refresh button * Update Langflow description * Add new_langflow_demo.gif and remove langflow-demo.gif and langflow-screen.png * Update image source path in README.md * Add dynamic options and default value support to CustomComponent class
This commit is contained in:
parent
bdc41d2856
commit
8c897514aa
8 changed files with 36 additions and 11 deletions
|
|
@ -403,13 +403,27 @@ export default function ParameterComponent({
|
|||
data-testid={"textarea-" + data.node.template[name].name}
|
||||
/>
|
||||
) : (
|
||||
<InputComponent
|
||||
id={"input-" + index}
|
||||
disabled={disabled}
|
||||
password={data.node?.template[name].password ?? false}
|
||||
value={data.node?.template[name].value ?? ""}
|
||||
onChange={handleOnNewValue}
|
||||
/>
|
||||
<div className="mt-2 flex w-full items-center">
|
||||
<div className="w-5/6 flex-grow">
|
||||
<InputComponent
|
||||
id={"input-" + index}
|
||||
disabled={disabled}
|
||||
password={data.node?.template[name].password ?? false}
|
||||
value={data.node?.template[name].value ?? ""}
|
||||
onChange={handleOnNewValue}
|
||||
/>
|
||||
</div>
|
||||
{data.node?.template[name].refresh && (
|
||||
<button
|
||||
className="extra-side-bar-buttons ml-2 mt-1 w-1/6"
|
||||
onClick={() => {
|
||||
handleUpdateValues(name, data);
|
||||
}}
|
||||
>
|
||||
<IconComponent name="RefreshCcw" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : left === true && type === "bool" ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue