Cadel Watson 1 ano atrás
pai
commit
1016201ee8
1 arquivos alterados com 2 adições e 0 exclusões
  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