From 94e384226725284d06fbfc91bc240c67e890a7b2 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 21 Oct 2016 00:20:56 +0200 Subject: [PATCH] Use server side num icons value on icons dashboard page. --- src/uxbox/main/ui/dashboard/icons.cljs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uxbox/main/ui/dashboard/icons.cljs b/src/uxbox/main/ui/dashboard/icons.cljs index 030ae52e9a..b66a1d6a50 100644 --- a/src/uxbox/main/ui/dashboard/icons.cljs +++ b/src/uxbox/main/ui/dashboard/icons.cljs @@ -130,11 +130,11 @@ (mx/defc nav-item {:mixins [mx/static mx/reactive]} - [{:keys [id type name] :as coll} selected?] + [{:keys [id type name num-icons] :as coll} selected?] (letfn [(on-click [event] (let [type (or type :own)] (rs/emit! (di/select-collection type id))))] - (let [num-icons (react-count-icons id)] + (let [num-icons (or num-icons (react-count-icons id))] [:li {:on-click on-click :class-name (when selected? "current")} [:span.element-title @@ -290,10 +290,10 @@ (mx/defc menu {:mixins [mx/static mx/reactive]} - [state {:keys [id] :as coll}] + [state {:keys [id num-icons] :as coll}] (let [ordering (:order state :name) filtering (:filter state "") - num-icons (react-count-icons id)] + num-icons (or num-icons (react-count-icons id))] (letfn [(on-term-change [event] (let [term (-> (dom/get-target event) (dom/get-value))]