From d96902f61d77db1f9218974bba49888c9e0dd0f3 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 3 Apr 2024 16:40:01 +0200 Subject: [PATCH] :bug: Fix filter layers --- frontend/src/app/main/ui/workspace/sidebar/layers.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs index debc362522..afe62a2b1d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs @@ -144,7 +144,10 @@ (conj :rect :circle :path :bool))] (or (= uuid/zero id) (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) (and (contains? filters :component) (contains? shape :component-id))