Forgot to remove active day when clicking All Days

This commit is contained in:
Vidir Valberg Gudmundsson 2017-07-17 21:52:54 +02:00
parent 540c8c1156
commit d2691e1802
3 changed files with 5 additions and 0 deletions

View file

@ -14,6 +14,7 @@ type Msg
= NoOp = NoOp
| WebSocketPayload String | WebSocketPayload String
| MakeActiveday Day | MakeActiveday Day
| RemoveActiveDay
| ToggleEventTypeFilter EventType | ToggleEventTypeFilter EventType
| ToggleEventLocationFilter EventLocation | ToggleEventLocationFilter EventLocation
| OnLocationChange Location | OnLocationChange Location

View file

@ -62,6 +62,9 @@ update msg model =
MakeActiveday day -> MakeActiveday day ->
{ model | activeDay = Just day } ! [] { model | activeDay = Just day } ! []
RemoveActiveDay ->
{ model | activeDay = Nothing } ! []
ToggleEventTypeFilter eventType -> ToggleEventTypeFilter eventType ->
let let
eventTypesFilter = eventTypesFilter =

View file

@ -34,6 +34,7 @@ dayPicker model =
, ( "btn-primary", isAllDaysActive ) , ( "btn-primary", isAllDaysActive )
] ]
, href ("#") , href ("#")
, onClick (RemoveActiveDay)
] ]
[ text "All Days" [ text "All Days"
] ]