0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-25 00:06:09 -05:00

Add asset item full path to the search filtering

This commit is contained in:
Andrey Antukh 2023-08-29 13:53:25 +02:00
parent e278d042ea
commit 8ff18a2a9e

View file

@ -39,11 +39,10 @@
(->> coll
(filter (fn [item]
(or (matches-search (:name item "!$!") term)
(matches-search (:path item "!$!") term)
(matches-search (:value item "!$!") term))))
; Sort by folder order, but
; putting all "root" items
; always first, independently
; of sort order.
;; Sort by folder order, but putting all "root" items always
;; first, independently of sort order.
(sort-by #(str/lower (cph/merge-path-item (if (empty? (:path %))
(if reverse? "z" "a")
(:path %))