reflex-frp / reflex-dom-semui

A reflex-dom API for Semantic UI components
https://reflex-frp.org/
BSD 3-Clause "New" or "Revised" License
22 stars 10 forks source link

Checkbox Immidiately Unchecks Itself #19

Closed andrewthad closed 6 years ago

andrewthad commented 7 years ago

I have a checkbox that looks like this:

  let isChecked = True
  cb <- uiCheckbox (text "") (def
    { R._checkboxConf_type = [CbToggle]
    , R._checkboxConf_attributes = bool M.empty (M.singleton "checked" "checked") isChecked
    , R._checkboxConf_initialValue = isChecked
    })

This works, but it's kind of a shame that I need to have _checkboxConf_attributes in there. If I do not add that in, the checkbox immidiately fires a change event and sets itself to False when the page loads.

tomsmalley commented 7 years ago

The examples contain a similar checkbox and it appears to be working for me. Do you see the same behaviour here? https://reflex-frp.github.io/reflex-dom-semui/ source: https://github.com/reflex-frp/reflex-dom-semui/blob/master/example/Main.hs#L89 I don't currently have the ghcjs toolchain installed but should be able to have a deeper look soon.

3noch commented 6 years ago

I have used the checkbox initial value but I haven't seen this.

3noch commented 6 years ago

Fixed by #23

mightybyte commented 6 years ago

Thanks for the heads-up!