aboutsummaryrefslogtreecommitdiff
path: root/src/View/Form.ml
diff options
context:
space:
mode:
authorJoris2020-08-09 18:46:05 +0200
committerJoris2020-08-09 18:46:05 +0200
commit2936f06576997bffe7903ea840df563a408efc21 (patch)
tree0fd9c802c73df3e506ac0f65cdd2f48ba3de6a60 /src/View/Form.ml
parent225068497c5fd41da12030a6bbf58a0fc9c294d0 (diff)
downloadmap-2936f06576997bffe7903ea840df563a408efc21.tar.gz
map-2936f06576997bffe7903ea840df563a408efc21.tar.bz2
map-2936f06576997bffe7903ea840df563a408efc21.zip
Improve autocompletion usage
Diffstat (limited to 'src/View/Form.ml')
-rw-r--r--src/View/Form.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/View/Form.ml b/src/View/Form.ml
index 53fbb7d..cec49d6 100644
--- a/src/View/Form.ml
+++ b/src/View/Form.ml
@@ -1,4 +1,4 @@
-let input id label init_value on_input =
+let input id label attrs =
H.div
[| HA.class_ "g-Form__Field" |]
[| H.div
@@ -8,10 +8,7 @@ let input id label init_value on_input =
[| H.text label |]
|]
; H.input
- [| HA.id id
- ; HE.on_input (fun e -> on_input (Element.value (Event.target e)))
- ; HA.value init_value
- |]
+ (HA.concat attrs [| HA.id id |])
[| |]
|]