Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add handleNoteDelete
  • Loading branch information
asmsuechan committed Oct 13, 2017
commit 3027cc81b39e07417e3f66ad79a1b297c5b0d86e
9 changes: 6 additions & 3 deletions browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ class NoteList extends React.Component {
}

handleNoteContextMenu (e, uniqueKey) {
this.handleNoteClick(e, uniqueKey)

const { location } = this.props
let targetIndex = _.findIndex(this.notes, (note) => {
return note != null && uniqueKey === `${note.storage}-${note.key}`
Expand All @@ -382,7 +380,7 @@ class NoteList extends React.Component {
}
menu.append(new MenuItem({
label: 'Delete Note',
click: () => ee.emit('detail:delete')
click: (e) => this.handleDeleteNote(e, uniqueKey)
}))
menu.popup()
}
Expand Down Expand Up @@ -428,6 +426,11 @@ class NoteList extends React.Component {
})
}

handleDeleteNote (e, uniqueKey) {
this.handleNoteClick(e, uniqueKey)
ee.emit('detail:delete')
}

importFromFile () {
const { dispatch, location } = this.props

Expand Down