1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

fix NoteList bug in Finder

This commit is contained in:
Dick Choi
2016-10-15 00:20:56 +09:00
parent 53989b918e
commit 7107777df3
2 changed files with 2 additions and 1 deletions

View File

@@ -57,7 +57,6 @@ class NoteList extends React.Component {
let { storageMap, notes, index } = this.props
let notesList = notes
.sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt))
.slice(0, 10 + 10 * this.state.range)
.map((note, _index) => {
let storage = storageMap[note.storage]

View File

@@ -266,6 +266,8 @@ class FinderMain extends React.Component {
let needle = new RegExp(_.escapeRegExp(search.trim()), 'i')
notes = notes.filter((note) => note.title.match(needle))
}
notes = notes
.sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt))
let activeNote = notes[this.state.index]
this.noteCount = notes.length