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

feat multi drag and drop for changing folder

This commit is contained in:
voidSatisfaction
2017-11-05 21:18:39 +09:00
parent 70b69a3bc9
commit bcb1fb4331
2 changed files with 45 additions and 31 deletions

View File

@@ -400,8 +400,12 @@ class NoteList extends React.Component {
}
handleDragStart (e, note) {
const noteData = JSON.stringify(note)
const { selectedNoteKeys } = this.state
const notes = this.notes.map((note) => Object.assign({}, note))
const selectedNotes = notes.filter((note) => selectedNoteKeys.includes(`${note.storage}-${note.key}`))
const noteData = JSON.stringify(selectedNotes)
e.dataTransfer.setData('note', noteData)
this.setState({ selectedNoteKeys: [] })
}
handleNoteContextMenu (e, uniqueKey) {