We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff530bb commit b97f778Copy full SHA for b97f778
2 files changed
src/Example/TodoForm.js
src/Example/TodoForm.purs
@@ -9,12 +9,13 @@ import Effect (Effect)
9
import React as React
10
import React.Hook (Hook)
11
import React.Hook as Hook
12
-import React.Ref (Ref, DOMRef)
13
import React.Ref as Ref
14
import React.SyntheticEvent as Event
15
import React.DOM as DOM
16
import React.DOM.Props as Props
17
+import Web.HTML.HTMLElement as HTML
18
+
19
import Unsafe.Coerce (unsafeCoerce)
20
21
import Example.TodoContext as TodoContext
@@ -74,7 +75,7 @@ todoForm
74
75
76
domRef <- Ref.getRef ref
77
- maybe (pure unit) blur domRef
78
+ maybe (pure unit) (HTML.blur <<< unsafeCoerce) domRef
79
80
pure unit
81
@@ -84,5 +85,3 @@ todoForm
84
85
todo
86
where
87
text = (unsafeCoerce event).target.value
-
88
-foreign import blur :: DOMRef -> Effect Unit
0 commit comments