mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: same context menu appearing across views for same index items
This commit is contained in:
@@ -42,7 +42,7 @@ const ItemSelector = ({ isSelected, toggleSelection }) => {
|
||||
};
|
||||
|
||||
function ListItem(props) {
|
||||
const menuId = `contextMenu${props.index}`;
|
||||
const menuId = `contextMenu-${props.item.id}`;
|
||||
const [parentRef, closeMenu, openMenu] = useContextMenu(menuId);
|
||||
const isSelectionMode = useSelectionStore((store) => store.isSelectionMode);
|
||||
const selectedItems = useSelectionStore((store) => store.selectedItems);
|
||||
@@ -185,7 +185,7 @@ function ListItem(props) {
|
||||
size={22}
|
||||
strokeWidth={2}
|
||||
color="icon"
|
||||
style={{ marginRight: -5 }}
|
||||
sx={{ marginRight: -1 }}
|
||||
onClick={(e) => {
|
||||
openMenu(e.nativeEvent, menuId, true);
|
||||
}}
|
||||
|
||||
@@ -27,7 +27,6 @@ function Colors(props) {
|
||||
<Icon.Checkmark
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: "4px",
|
||||
left: "5px",
|
||||
cursor: "pointer",
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user