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:
committed by
Facebook GitHub Bot
parent
795ee90ea1
commit
93201b4e5d
@@ -58,7 +58,7 @@ export function FilterIcon({
|
|||||||
onMouseDown={(e) => {
|
onMouseDown={(e) => {
|
||||||
e.stopPropagation(); // prevents interaction accidentally with the Interactive component organizing resizng
|
e.stopPropagation(); // prevents interaction accidentally with the Interactive component organizing resizng
|
||||||
}}>
|
}}>
|
||||||
<Menu.Item>
|
<Menu.Item key="addFilter">
|
||||||
<Layout.Right gap>
|
<Layout.Right gap>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Filter by value"
|
placeholder="Filter by value"
|
||||||
@@ -116,14 +116,14 @@ export function FilterIcon({
|
|||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<Menu.Item disabled>
|
<Menu.Item disabled key="nofilters">
|
||||||
<Text type="secondary" style={{margin: 12}}>
|
<Text type="secondary" style={{margin: 12}}>
|
||||||
No active filters
|
No active filters
|
||||||
</Text>
|
</Text>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
)}
|
)}
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
<Menu.Item>
|
<Menu.Item key="inverse">
|
||||||
<Layout.Horizontal
|
<Layout.Horizontal
|
||||||
gap
|
gap
|
||||||
center
|
center
|
||||||
@@ -146,7 +146,7 @@ export function FilterIcon({
|
|||||||
</Layout.Horizontal>
|
</Layout.Horizontal>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
<Menu.Item disabled>
|
<Menu.Item disabled key="fromselection">
|
||||||
<div style={{textAlign: 'right'}}>
|
<div style={{textAlign: 'right'}}>
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
|
|||||||
Reference in New Issue
Block a user