From 20de08b625d05b4e01e52a264c9f9d270deface5 Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Mon, 30 Oct 2017 16:18:49 +0100 Subject: [PATCH] added the context menu to the list view --- browser/components/NoteItemSimple.js | 4 +++- browser/main/NoteList/index.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/components/NoteItemSimple.js b/browser/components/NoteItemSimple.js index 42cbe51a..f13cd571 100644 --- a/browser/components/NoteItemSimple.js +++ b/browser/components/NoteItemSimple.js @@ -10,15 +10,17 @@ import styles from './NoteItemSimple.styl' * @param {boolean} isActive * @param {Object} note * @param {Function} handleNoteClick + * @param {Function} handleNoteContextMenu * @param {Function} handleDragStart */ -const NoteItemSimple = ({ isActive, note, handleNoteClick, handleDragStart }) => ( +const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu, handleDragStart }) => (
handleNoteClick(e, `${note.storage}-${note.key}`)} + onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)} onDragStart={e => handleDragStart(e, note)} draggable='true' > diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 5729d476..12ba7af3 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -510,6 +510,7 @@ class NoteList extends React.Component { isActive={isActive} note={note} key={key} + handleNoteContextMenu={this.handleNoteContextMenu.bind(this)} handleNoteClick={this.handleNoteClick.bind(this)} handleDragStart={this.handleDragStart.bind(this)} />