소스 검색

Add comment

Cadel Watson 1 년 전
부모
커밋
1016201ee8
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/Main.elm

+ 2 - 0
src/Main.elm

@@ -114,6 +114,8 @@ viewDraft draft =
             List.map (\c -> viewKeyedCard (chosen.name == c.name) c)
                 (Zipper.focus draft).available
     in
+    -- Making this a keyed node forces Elm to recreate each card when the card name changes,
+    -- so the old image doesn't hang around during loading of the new card image
     Keyed.node "div"
         [ class "grid grid-cols-8 w-100 gap-6" ]
         picks