mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): Typing in the NodeKeyValueInput field causes the field to un-focus (#8680)
* fix(frontend): Typing in the "Prompt Values" input field causes the field to un-focus * Add comment * Rephrase
This commit is contained in:
@@ -404,7 +404,11 @@ const NodeKeyValueInput: FC<{
|
||||
>
|
||||
<div>
|
||||
{keyValuePairs.map(({ key, value }, index) => (
|
||||
<div key={getEntryKey(key)}>
|
||||
/*
|
||||
The `index` is used as a DOM key instead of the actual `key`
|
||||
because the `key` can change with each input, causing the input to lose focus.
|
||||
*/
|
||||
<div key={index}>
|
||||
<NodeHandle
|
||||
keyName={getEntryKey(key)}
|
||||
schema={{ type: "string" }}
|
||||
|
||||
Reference in New Issue
Block a user