Skip to content

Commit

Permalink
Fix Key Value List Component Typing Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Nov 5, 2024
1 parent 8bc61a8 commit 23bfa6b
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 23bfa6b

Please sign in to comment.