1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-23 22:51:42 +00:00

Merge pull request #1528 from Redsandro/selectionOnSearch

UX: Keep selection synced with note visibility
This commit is contained in:
Kazz Yokomizo
2018-02-19 15:07:25 +09:00
committed by GitHub
2 changed files with 21 additions and 4 deletions

View File

@@ -35,14 +35,16 @@ class NewNoteModal extends React.Component {
content: ''
})
.then((note) => {
const noteHash = `${note.storage}-${note.key}`
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: note.storage + '-' + note.key}
query: {key: noteHash}
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
this.props.close()
})
@@ -73,14 +75,16 @@ class NewNoteModal extends React.Component {
}]
})
.then((note) => {
const noteHash = `${note.storage}-${note.key}`
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: note.storage + '-' + note.key}
query: {key: noteHash}
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
this.props.close()
})