Fixed React key warning

Summary: Seems Antd always requires a `key` for Menu Items, even when React doesn't strictly need them.

Reviewed By: timur-valiev

Differential Revision: D30839589

fbshipit-source-id: 9cbef32c8fa083a7e23e486e15c537b4a9259a08
This commit is contained in:
Michel Weststrate
2021-09-09 06:59:58 -07:00
committed by Facebook GitHub Bot
parent 795ee90ea1
commit 93201b4e5d

View File

@@ -58,7 +58,7 @@ export function FilterIcon({
onMouseDown={(e) => {
e.stopPropagation(); // prevents interaction accidentally with the Interactive component organizing resizng
}}>
<Menu.Item>
<Menu.Item key="addFilter">
<Layout.Right gap>
<Input
placeholder="Filter by value"
@@ -116,14 +116,14 @@ export function FilterIcon({
</Menu.Item>
))
) : (
<Menu.Item disabled>
<Menu.Item disabled key="nofilters">
<Text type="secondary" style={{margin: 12}}>
No active filters
</Text>
</Menu.Item>
)}
<Menu.Divider />
<Menu.Item>
<Menu.Item key="inverse">
<Layout.Horizontal
gap
center
@@ -146,7 +146,7 @@ export function FilterIcon({
</Layout.Horizontal>
</Menu.Item>
<Menu.Divider />
<Menu.Item disabled>
<Menu.Item disabled key="fromselection">
<div style={{textAlign: 'right'}}>
<Button
type="link"