fix: add missing JSX key props in segment-filter SelectItem lists

Two SelectItem.map blocks in DeviceFilter were missing the `key` prop,
producing the React reconciler warning and risking incorrect item
reuse across renders. Use `operator.id` (stable, unique within each
list) as the key.

Flagged by react-doctor as react-doctor/jsx-key (Correctness, error).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matti Nannt
2026-05-23 14:39:33 +02:00
parent be5beaeed7
commit 924060e913
@@ -811,7 +811,9 @@ function DeviceFilter({
<SelectContent>
{operatorArr.map((operator) => (
<SelectItem value={operator.id}>{operator.name}</SelectItem>
<SelectItem key={operator.id} value={operator.id}>
{operator.name}
</SelectItem>
))}
</SelectContent>
</Select>
@@ -831,7 +833,9 @@ function DeviceFilter({
{ id: "desktop", name: t("workspace.segments.desktop") },
{ id: "phone", name: t("workspace.segments.phone") },
].map((operator) => (
<SelectItem value={operator.id}>{operator.name}</SelectItem>
<SelectItem key={operator.id} value={operator.id}>
{operator.name}
</SelectItem>
))}
</SelectContent>
</Select>