Skip to content

Commit e6fcd98

Browse files
Update examples to use new Event type
1 parent 1e71119 commit e6fcd98

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

examples/Components/Dropdown.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type Input =
3434
component :: H.Component HH.HTML S.Query' Input Message Aff
3535
component = S.component input $ S.defaultSpec
3636
{ render = render
37-
, handleMessage = handleMessage
37+
, handleEvent = handleEvent
3838
}
3939
where
4040
input :: Input -> S.Input State
@@ -48,8 +48,8 @@ component = S.component input $ S.defaultSpec
4848
, selection: Nothing
4949
}
5050

51-
handleMessage :: S.Message -> H.HalogenM (S.State State) S.Action' () Message Aff Unit
52-
handleMessage = case _ of
51+
handleEvent :: S.Event -> H.HalogenM (S.State State) S.Action' () Message Aff Unit
52+
handleEvent = case _ of
5353
S.Selected ix -> do
5454
st <- H.get
5555
let selection = st.items !! ix

examples/Components/Typeahead.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ component = S.component (const input) $ S.defaultSpec
5151
{ render = render
5252
, handleAction = handleAction
5353
, handleQuery = handleQuery
54-
, handleMessage = handleMessage
54+
, handleEvent = handleEvent
5555
}
5656
where
5757
-- this typeahead will be opaque; users can just use this pre-built
@@ -66,10 +66,10 @@ component = S.component (const input) $ S.defaultSpec
6666
, available: RD.NotAsked
6767
}
6868

69-
handleMessage
70-
:: S.Message
69+
handleEvent
70+
:: S.Event
7171
-> H.HalogenM (S.State State) (S.Action Action) ChildSlots Message Aff Unit
72-
handleMessage = case _ of
72+
handleEvent = case _ of
7373
S.Selected ix -> do
7474
st <- H.get
7575
for_ st.available \arr ->

0 commit comments

Comments
 (0)