-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Describe the bug
I have a large list of items, each item with its own state. So, I have the Item component with code like this:
function Item() {
const { showContextMenu } = useContextMenu()
return (
<div
onContextMenu={showContextMenu([
{
key: 'action',
onClick: () => alert('action'),
},
])}
>
Test
</div>
)
}When I click the right mouse button on one of the items, the whole list (each item) re-renders.
Expected behavior
Only the clicked item re-renders.
Desktop (please complete the following information):
- OS: Artix Linux 6.8.7
- Browser: Firefox Developer Edition 126.0b9
- Mantine: 7.8.1
Metadata
Metadata
Assignees
Labels
No labels