mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-25 03:10:22 -05:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user