🐛 fix(parameterComponent): remove redundant conditional statement and set dictionary array and node template value directly
The conditional statement checking for duplicate keys and setting the dictionary array was redundant. Instead, the dictionary array is now always set to the new value. Additionally, the node template value is now always updated with the new value.
This commit is contained in:
parent
55001b98c8
commit
4a03e81314
1 changed files with 2 additions and 6 deletions
|
|
@ -389,12 +389,8 @@ export default function ParameterComponent({
|
|||
duplicateKey={errorDuplicateKey}
|
||||
onChange={(newValue) => {
|
||||
setErrorDuplicateKey(hasDuplicateKeys(newValue));
|
||||
if (hasDuplicateKeys(newValue)) {
|
||||
setDictArr(newValue);
|
||||
} else {
|
||||
setDictArr(newValue);
|
||||
data.node!.template[name].value = newValue;
|
||||
}
|
||||
setDictArr(newValue);
|
||||
data.node!.template[name].value = newValue;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue