Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radio button doesn't update if dynamically changed #79

Closed
jasiskis opened this issue Jan 2, 2016 · 1 comment
Closed

Radio button doesn't update if dynamically changed #79

jasiskis opened this issue Jan 2, 2016 · 1 comment

Comments

@jasiskis
Copy link

jasiskis commented Jan 2, 2016

When the referenced atom is dynamically changed the radio button option is not selected accordingly.

eg:

(def project-form
  [:div
   [:input.radio-inline {:field :radio :value true :name :approved} "Yes"]
   [:input.radio-inline {:field :radio :value false :name :approved} "No"]])

(defn project-page []
  (let [project (atom {:approved false})]
    (js/setTimeout #(reset! project {:approved true}) 1000)
    (fn []
      [:div.container
       [bind-fields project-form project]
       [:button {:on-click #(js/console.log (str @project))}]])))

@yogthos
Copy link
Member

yogthos commented Jan 2, 2016

sounds like the same issue #19

@yogthos yogthos closed this as completed Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants