1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add handleNoteDelete

This commit is contained in:
asmsuechan
2017-10-13 13:50:00 +09:00
parent 2415fbf676
commit 3027cc81b3

View File

@@ -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}`
@@ -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()
}
@@ -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