SIGN IN SIGN UP
langflow-ai / langflow UNCLAIMED

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

0 0 1 Python

refactor: update template api, handleonnewvalue and handlenodeclass hooks (#2628)

* Added Custom Component URL

* Added Post Template Value mutation

* Changed HandleOnNewValue hook to ParameterValue mutation

* refactored some states

* Added NumberInput component to replace input type=number. Added logic to maintain cursor at the same place when editing

* Refactored post-template-value to remove all logic

* Removed hooks from custom hook and removed mutation definition from parametercomponent

* Added mutate-template helper to call debounced mutation

* Changed handle new value to use the created function and update as requested.

* Removed pDebounce from imports

* Refactored FetchDataOnMount to only call mutateTemplate

* Refactored ParameterComponent to use the new MutateTemplate and the loading from the mutation

* removed handle refresh button

* Changed handleOnNewValue to change the value of any parameter of a template field

* Changed hooks to receive node instead of data, added HandleOnNewValue hook on tableNodeCellRender

* added SetNodeClass to update internal table state of EditNodeModal

* Removed other handle new value and node class, updated every component to use the same one

* Updated parameter component to use the same nodeclass hook

* FIxed hook to only assign value if code is present

* Fixed type attribution on useHandleNodeClass
L
Lucas Oliveira committed
b3c1b941b32014b40daf69b10bb8453c8a963a80
Parent: f701d86
Committed by GitHub <noreply@github.com> on 7/19/2024, 4:12:19 PM