Commit 88b26bf1 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[bootstrap v4] fix for rename action

parent d410c7b7
...@@ -80,7 +80,7 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R ...@@ -80,7 +80,7 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R
textInput renameNodeNameRef = textInput renameNodeNameRef =
H.div {className: "col-8"} H.div {className: "col-8"}
[ inputWithEnter { [ inputWithEnter {
onEnter: submit $ R.readRef renameNodeNameRef onEnter: submit renameNodeNameRef
, onValueChanged: R.setRef renameNodeNameRef , onValueChanged: R.setRef renameNodeNameRef
, autoFocus: false , autoFocus: false
, className: "form-control" , className: "form-control"
...@@ -100,7 +100,7 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R ...@@ -100,7 +100,7 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R
submitBtn renameNodeNameRef = submitBtn renameNodeNameRef =
H.a {className: "col-2 " <> glyphicon "floppy-o" H.a {className: "col-2 " <> glyphicon "floppy-o"
, type: "button" , type: "button"
, on: { click: submit $ R.readRef renameNodeNameRef } , on: { click: submit renameNodeNameRef }
, title: "Submit" , title: "Submit"
} [] } []
cancelBtn = cancelBtn =
...@@ -109,9 +109,9 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R ...@@ -109,9 +109,9 @@ textInputBox p@{ boxName, boxAction, dispatch, isOpen: (true /\ setIsOpen) } = R
, on: { click: \_ -> setIsOpen $ const false } , on: { click: \_ -> setIsOpen $ const false }
, title: "Cancel" , title: "Cancel"
} [] } []
submit newName _ = do submit renameNodeNameRef _ = do
setIsOpen $ const false setIsOpen $ const false
launchAff_ $ dispatch ( boxAction newName ) launchAff_ $ dispatch ( boxAction $ R.readRef renameNodeNameRef )
textInputBox p@{ boxName, isOpen: (false /\ _) } = R.createElement el p [] textInputBox p@{ boxName, isOpen: (false /\ _) } = R.createElement el p []
where where
el = R.hooksComponentWithModule thisModule (boxName <> "Box") cpt el = R.hooksComponentWithModule thisModule (boxName <> "Box") cpt
......
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