Merge pull request #178 from uxbox/fix-search

Fix search
This commit is contained in:
Hirunatan
2020-04-15 10:40:57 +02:00
committed by GitHub
2 changed files with 10 additions and 3 deletions

View File

@@ -55,10 +55,17 @@
ppr.is_owner = true or
ppr.can_edit = true)
)
select file.*
select distinct
file.*,
array_agg(page.id) over pages_w as pages,
first_value(page.data) over pages_w as data
from file
inner join projects as pr on (file.project_id = pr.id)
left join page on (file.id = page.file_id)
where file.name ilike ('%' || $3 || '%')
window pages_w as (partition by file.id order by page.created_at
range between unbounded preceding
and unbounded following)
order by file.created_at asc")
(s/def ::search-files

View File

@@ -148,8 +148,8 @@
on-search-blur
(fn [event]
(let [target (dom/get-target event)]
(dom/clean-value! target)
(debounced-emit! (rt/nav :dashboard-team {:team-id team-id}))))
(dom/clean-value! target)))
;; (debounced-emit! (rt/nav :dashboard-team {:team-id team-id}))))
on-search-change
(fn [event]