From 414dceec8bb54a4303d8d436c94dc2b0de7d1702 Mon Sep 17 00:00:00 2001 From: Nicholas Kariniemi Date: Mon, 24 Nov 2014 16:26:34 +0200 Subject: [PATCH] Sort recipes by name --- src/cljs/grub/view/recipe_list.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cljs/grub/view/recipe_list.cljs b/src/cljs/grub/view/recipe_list.cljs index bc86ff0..6d009cc 100644 --- a/src/cljs/grub/view/recipe_list.cljs +++ b/src/cljs/grub/view/recipe_list.cljs @@ -23,7 +23,9 @@ [:h3.recipes-title "Recipes"] (om/build recipe-new/view {} {:opts {:add-recipe-ch add-recipe-ch}}) [:ul#recipe-list.list-group.recipe-list - (for [recipe (vals recipes)] + (for [recipe (->> recipes + vals + (sort-by #(.toLowerCase (:name %))))] (om/build recipe/view recipe {:key :id :opts {:remove-recipe-ch remove-recipe-ch}}))]]))