Skip to content

Commit

Permalink
fix(ui): Remove spread of key prop (#83345)
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper authored Jan 13, 2025
1 parent 2ce7d85 commit e221530
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion static/app/components/compactSelect/composite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function Region<Value extends SelectKey>({
label={label}
>
{(opt: SelectOption<Value>) => (
<Item key={opt.value} {...opt}>
<Item {...opt} key={opt.value}>
{opt.label}
</Item>
)}
Expand Down
6 changes: 5 additions & 1 deletion static/app/components/compactSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ function CompactSelect<Value extends SelectKey>({
);
}

return <Item {...item}>{item.label}</Item>;
return (
<Item {...item} key={item.key}>
{item.label}
</Item>
);
}}
</List>

Expand Down
2 changes: 1 addition & 1 deletion static/app/components/draggableTabs/draggableTabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export function DraggableTabList({items, onAddView, ...props}: DraggableTabListP
disabledKeys={disabledKeys}
{...props}
>
{item => <Item {...item} />}
{item => <Item {...item} key={item.key} />}
</BaseDraggableTabList>
);
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/dropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function DropdownMenu({
);
}
return (
<Item size={size} {...item}>
<Item size={size} {...item} key={item.key}>
{item.label}
</Item>
);
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tabs/tabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export function TabList({items, variant, ...props}: TabListProps) {
variant={variant}
{...props}
>
{item => <Item {...item} />}
{item => <Item {...item} key={item.key} />}
</BaseTabList>
);
}
Expand Down

0 comments on commit e221530

Please sign in to comment.