mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Add handleNoteDelete
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user