Skip to content

Commit 7256984

Browse files
committed
Merge pull request #9304 from GilbertCherrie/fix_keyvaluelist_component_bug
Fix Key Value List Component Typing Bug
2 parents 0a3bfeb + 23bfa6b commit 7256984

File tree

2 files changed

+4
-2
lines changed
  • app/javascript/components

2 files changed

+4
-2
lines changed

app/javascript/components/ansible-playbook-edit-catalog-form/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ export const KeyValueListComponent = (props) => {
182182
<label htmlFor={input.name} className="bx--label">{label}</label>
183183
<br />
184184
{input.value && input.value.map((pair, index) => (
185-
<div key={pair.key} className="key-value-list-pair">
185+
// eslint-disable-next-line react/no-array-index-key
186+
<div key={index} className="key-value-list-pair">
186187
<TextInput
187188
id={`${input.name}.${index}.key`}
188189
labelText={keyLabel}

app/javascript/components/terraform-template-catalog-form/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ export const KeyValueListComponent = (props) => {
183183
<label htmlFor={input.name} className="bx--label">{label}</label>
184184
<br />
185185
{input.value && input.value.map((pair, index) => (
186-
<div key={pair.key} className="key-value-list-pair">
186+
// eslint-disable-next-line react/no-array-index-key
187+
<div key={index} className="key-value-list-pair">
187188
<TextInput
188189
id={`${input.name}.${index}.key`}
189190
labelText={keyLabel}

0 commit comments

Comments
 (0)