mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
fix NoteList bug in Finder
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user