Skip to content

Commit

Permalink
Merge pull request mtgred#3874 from jwarwick/alt_select
Browse files Browse the repository at this point in the history
Fix alt art setting behavior
  • Loading branch information
nealterrell authored Sep 24, 2018
2 parents bc1375b + 5a8b2df commit 377e15d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cljs/nr/account.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

(defn reset-card-art
([s] (let [art (:all-art-select @s)]
(reset-card-art art)))
(reset-card-art s art)))
([s art]
(doseq [card (vals (:alt-arts @app-state))]
(update-card-art card art s))))
Expand Down Expand Up @@ -243,7 +243,8 @@
(when (and (:special @user) (:alt-arts @app-state))
[:div {:id "my-alt-art"}
[:h4 "My alternate card arts"]
[:select {:value "" :on-change #(select-card (.. % -target -value) s)}
[:select {:value (:alt-card @s)
:on-change #(select-card (.. % -target -value) s)}
(doall (for [card (sort-by :title (vals (:alt-arts @app-state)))] ^{:key (:code card)}
[:option {:value (:code card)} (:title card)]))]

Expand Down

0 comments on commit 377e15d

Please sign in to comment.