From 4359321bed4d9dc0ef760982fcdf21d6c42e7e13 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 10 Nov 2016 23:56:59 +0100 Subject: [PATCH] Fix wrong initial filtering and ordering values in icons page. --- src/uxbox/main/ui/dashboard/icons.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/uxbox/main/ui/dashboard/icons.cljs b/src/uxbox/main/ui/dashboard/icons.cljs index c04d3bab15..503151bfcb 100644 --- a/src/uxbox/main/ui/dashboard/icons.cljs +++ b/src/uxbox/main/ui/dashboard/icons.cljs @@ -41,6 +41,8 @@ (defn- contains-term? [phrase term] + {:pre [(string? phrase) + (string? term)]} (let [term (name term)] (str/includes? (str/lower phrase) (str/trim (str/lower term))))) @@ -320,8 +322,8 @@ {:mixins [mx/static mx/reactive]} [{:keys [selected id type] :as state}] (let [editable? (or (= type :own) (nil? id)) - ordering (:order state) - filtering (:filter state) + ordering (:order state :name) + filtering (:filter state "") icons (mx/react icons-ref) icons (->> (vals icons) (filter #(= id (:collection %)))