Forgot to remove active day when clicking All Days
This commit is contained in:
parent
540c8c1156
commit
d2691e1802
|
@ -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
|
||||||
|
|
|
@ -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 =
|
||||||
|
|
|
@ -34,6 +34,7 @@ dayPicker model =
|
||||||
, ( "btn-primary", isAllDaysActive )
|
, ( "btn-primary", isAllDaysActive )
|
||||||
]
|
]
|
||||||
, href ("#")
|
, href ("#")
|
||||||
|
, onClick (RemoveActiveDay)
|
||||||
]
|
]
|
||||||
[ text "All Days"
|
[ text "All Days"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue