Sort completed grubs to end

This commit is contained in:
Nicholas Kariniemi 2013-08-20 19:16:06 +03:00
parent f19a0b022b
commit c168227df7

View file

@ -97,7 +97,7 @@
(defn render-grub-list [grubs]
(let [grub-list (sel1 :#grubList)
sorted-grubs (sort-by :_id grubs)]
sorted-grubs (sort-by (juxt :completed :_id) grubs)]
(aset grub-list "innerHTML" "")
(doseq [grub sorted-grubs]
(dommy/append! grub-list (grub-template grub)))))