Skip to content

Commit

Permalink
Merge pull request #9304 from GilbertCherrie/fix_keyvaluelist_compone…
Browse files Browse the repository at this point in the history
…nt_bug

Fix Key Value List Component Typing Bug

(cherry picked from commit 7256984)
  • Loading branch information
agrare authored and Fryguy committed Nov 14, 2024
1 parent 873d25c commit 207cf94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export const KeyValueListComponent = (props) => {
<label htmlFor={input.name} className="bx--label">{label}</label>
<br />
{input.value && input.value.map((pair, index) => (
<div key={pair.key} className="key-value-list-pair">
// eslint-disable-next-line react/no-array-index-key
<div key={index} className="key-value-list-pair">
<TextInput
id={`${input.name}.${index}.key`}
labelText={keyLabel}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ export const KeyValueListComponent = (props) => {
<label htmlFor={input.name} className="bx--label">{label}</label>
<br />
{input.value && input.value.map((pair, index) => (
<div key={pair.key} className="key-value-list-pair">
// eslint-disable-next-line react/no-array-index-key
<div key={index} className="key-value-list-pair">
<TextInput
id={`${input.name}.${index}.key`}
labelText={keyLabel}
Expand Down

0 comments on commit 207cf94

Please sign in to comment.