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

Make context-search work

This commit is contained in:
asmsuechan
2017-08-05 22:23:33 +09:00
parent f32ac81f84
commit 6987b762dd
2 changed files with 2 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
import _ from 'lodash'
export default function searchFromNotes (data, search) {
let notes = data.noteMap.map((note) => note)
export default function searchFromNotes (notes, search) {
if (search.trim().length === 0) return []
let searchBlocks = search.split(' ')
searchBlocks.forEach((block) => {

View File

@@ -246,7 +246,7 @@ class NoteList extends React.Component {
if (searchInputText === '') {
router.push('/home')
}
return searchFromNotes(this.props.data, searchInputText)
return searchFromNotes(this.notes, searchInputText)
}
if (location.pathname.match(/\/trashed/)) {