1
0

fix(quick actions): project search

This commit is contained in:
kolaente
2023-08-29 10:08:47 +02:00
parent a4b369470a
commit 442d0342a9
2 changed files with 7 additions and 11 deletions

View File

@ -143,18 +143,13 @@ const foundProjects = computed(() => {
searchMode.value === SEARCH_MODE.PROJECTS ||
text === ''
) {
return []
const history = getHistory()
return history.map((p) => projectStore.projects[p.id])
.filter(p => Boolean(p))
}
const history = getHistory()
const allProjects = [
...new Set([
...history.map((p) => projectStore.projects[p.id]),
...projectStore.searchProject(project),
]),
]
return allProjects.filter(p => Boolean(p))
return projectStore.searchProject(project ?? text)
.filter(p => Boolean(p))
})
// FIXME: use fuzzysearch