Commit d2dd2402 authored by arturo's avatar arturo

>>> continue

parent 1cdc291a
Pipeline #1583 canceled with stage
...@@ -76,7 +76,7 @@ addNodeViewCpt = here.component "addNodeView" cpt where ...@@ -76,7 +76,7 @@ addNodeViewCpt = here.component "addNodeView" cpt where
let let
print nt = charCodeIcon nt print nt = charCodeIcon nt
<> nbsp 3 <> nbsp 4
<> translate EN nt -- @TODO "EN" assumption <> translate EN nt -- @TODO "EN" assumption
SettingsBox {edit} = settingsBox nodeType' SettingsBox {edit} = settingsBox nodeType'
......
...@@ -161,6 +161,7 @@ formButton nodeType setNodeType = ...@@ -161,6 +161,7 @@ formButton nodeType setNodeType =
formChoiceSafe' :: forall item m formChoiceSafe' :: forall item m
. Read item . Read item
=> Show item
=> Array item => Array item
-> item -> item
-> (item -> Effect m) -> (item -> Effect m)
...@@ -172,6 +173,7 @@ formChoiceSafe' arr def cbk prnt = formChoice' arr def cbk prnt ...@@ -172,6 +173,7 @@ formChoiceSafe' arr def cbk prnt = formChoice' arr def cbk prnt
formChoice' :: forall item m formChoice' :: forall item m
. Read item . Read item
=> Show item
=> Array item => Array item
-> item -> item
-> (item -> Effect m) -> (item -> Effect m)
...@@ -183,14 +185,16 @@ formChoice' items def cbk prnt = ...@@ -183,14 +185,16 @@ formChoice' items def cbk prnt =
[ [
R2.select R2.select
{ className: "form-control with-icon-font" { className: "form-control with-icon-font"
, on: { change: \e -> cbk $ fromMaybe def $ read $ R.unsafeEventValue e } , on: { change }
} $ } $
map option items map option items
] ]
where where
change e = cbk $ fromMaybe def $ read $ R.unsafeEventValue e
option opt = option opt =
H.option { value: opt } H.option { value: show opt }
[ H.text $ prnt opt ] [ H.text $ prnt opt ]
formButton' :: forall item m formButton' :: forall item m
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment