Skip to content

Commit ff4a505

Browse files
committed
chore(fix-lint): list should have unique "key" prop
1 parent c5d9fc6 commit ff4a505

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/behaviors/ParameterValuePicker.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export const ParameterValuePicker = ({
2424
className="h-8 rounded"
2525
onChange={(e) => onValueChanged(parseInt(e.target.value))}
2626
>
27-
{values.map((v) => (
28-
<option value={v.constant}>{v.name}</option>
27+
{values.map((v, i) => (
28+
<option key={i} value={v.constant}>
29+
{v.name}
30+
</option>
2931
))}
3032
</select>
3133
</div>
@@ -66,7 +68,9 @@ export const ParameterValuePicker = ({
6668
onChange={(e) => onValueChanged(parseInt(e.target.value))}
6769
>
6870
{layers.map(({ name, id }) => (
69-
<option value={id}>{name}</option>
71+
<option key={id} value={id}>
72+
{name}
73+
</option>
7074
))}
7175
</select>
7276
</div>

0 commit comments

Comments
 (0)