Try changing *update *to this:
{ model | notifications = True } -- instead of { model | notifications =
not model.notifications }
Stateful elements, including checkboxes, seem to ignore what Elm tells
them, and simply use their own internal current state. Not sure what
virtual dom is (or should be) doing in these cases.
On Wednesday, November 16, 2016 at 10:56:02 AM UTC-6, Mark Hamburg wrote:
>
> The checkbox example on the Elm site initializes the model to have all the
> checkboxes set, but does not reflect this state when it runs since it never
> feeds the model values through to the view.
>
> I notice this in a lot of Elm examples. For example, the sign up form
> example doesn't populate the model values into the text fields. Is this
> just a case on relying on the model having been initialized in the same way
> the fields default and then just expecting to track changes? That seems
> like a bad pattern in more common practice.
>
> Mark
>
>
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.