From 61ee967554ad27384f1fc8b528c32dec2fc25daf Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 15 Apr 2026 19:12:31 +0000 Subject: [PATCH] :recycle: Replace local xf:add-index with d/xf:add-index in shadow menu Signed-off-by: Andrey Antukh --- .../main/ui/workspace/sidebar/options/menus/shadow.cljs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs index cd13821c30..22b3f9c709 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/shadow.cljs @@ -44,16 +44,12 @@ (filterv (fn [[idx _]] (not= idx index))) (mapv second))) -(def ^:private xf:add-index - (map-indexed (fn [index shadow] - (assoc shadow ::index index)))) - (mf/defc shadow-menu* [{:keys [ids type values] :as props}] (let [shadows (mf/with-memo [values] (if (= :multiple values) values - (not-empty (into [] xf:add-index values)))) + (not-empty (into [] d/xf:add-index values)))) ids-ref (h/use-update-ref ids) @@ -161,7 +157,7 @@ (some? shadows) [:> h/sortable-container* {} [:div {:class (stl/css :shadow-content)} - (for [{:keys [::index id] :as shadow} shadows] + (for [{:keys [::d/index id] :as shadow} shadows] [:> shadow-row* {:key (dm/str index) :index index