0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Fix wrong initial filtering and ordering values in icons page.

This commit is contained in:
Andrey Antukh 2016-11-10 23:56:59 +01:00
parent dde3991702
commit 4359321bed
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -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 %)))