소스 검색

small bugfix

Brandon Wong 2 년 전
부모
커밋
f1f57fcd19
2개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      src/lineup/components/edit.cljs
  2. 5 3
      src/lineup/events.cljs

+ 1 - 1
src/lineup/components/edit.cljs

@@ -66,7 +66,7 @@
         :margin "0 0 0 20px"
         :child
         [re-com/button
-         :label "+"
+         :label "+ add"
          :class "btn-primary btn-block"
          :on-click #(re-frame/dispatch [::events/select-selecting (count (:tasks @schedule-data))])]]])]))
 

+ 5 - 3
src/lineup/events.cljs

@@ -24,9 +24,11 @@
    (update-in
     db
     [:schedule :tasks]
-    (partial map-indexed #(if (= %1 which)
-                            (update %2 :complete? not)
-                            %2)))))
+    (comp
+     vec
+     (partial map-indexed #(if (= %1 which)
+                             (update %2 :complete? not)
+                             %2))))))
 
 (re-frame/reg-event-fx
  ::select-task