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:
parent
e278d042ea
commit
8ff18a2a9e
1 changed files with 3 additions and 4 deletions
|
@ -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 %))
|
||||||
|
|
Loading…
Add table
Reference in a new issue