0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-25 08:16:49 -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 (->> coll
(filter (fn [item] (filter (fn [item]
(or (matches-search (:name item "!$!") term) (or (matches-search (:name item "!$!") term)
(matches-search (:path item "!$!") term)
(matches-search (:value item "!$!") term)))) (matches-search (:value item "!$!") term))))
; Sort by folder order, but ;; Sort by folder order, but putting all "root" items always
; putting all "root" items ;; first, independently of sort order.
; always first, independently
; of sort order.
(sort-by #(str/lower (cph/merge-path-item (if (empty? (:path %)) (sort-by #(str/lower (cph/merge-path-item (if (empty? (:path %))
(if reverse? "z" "a") (if reverse? "z" "a")
(:path %)) (:path %))