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
This commit is contained in:
parent
f701d86dde
commit
b3c1b941b3
19 changed files with 965 additions and 436 deletions
|
|
@ -3,6 +3,7 @@
|
|||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@chakra-ui/number-input": "^2.1.2",
|
||||
"@headlessui/react": "^2.0.4",
|
||||
"@hookform/resolvers": "^3.6.0",
|
||||
"@million/lint": "^1.0.0-rc.26",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue