0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Fix filter layers

This commit is contained in:
alonso.torres 2024-04-03 16:40:01 +02:00
parent 677da04c43
commit d96902f61d

View file

@ -144,7 +144,10 @@
(conj :rect :circle :path :bool))] (conj :rect :circle :path :bool))]
(or (= uuid/zero id) (or (= uuid/zero id)
(and (or (str/includes? (str/lower (:name shape)) (str/lower search)) (and (or (str/includes? (str/lower (:name shape)) (str/lower search))
(str/includes? (dm/str (:id shape)) (str/lower search))) ;; Only for local development we allow search for ids. Otherwise will be hard
;; search for numbers or single letter shape names (ie: "A")
(and *assert*
(str/includes? (dm/str (:id shape)) (str/lower search))))
(or (empty? filters) (or (empty? filters)
(and (contains? filters :component) (and (contains? filters :component)
(contains? shape :component-id)) (contains? shape :component-id))