Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
fix: properly evaluating after chaning a value in a modal
Browse files Browse the repository at this point in the history
  • Loading branch information
prescientmoon committed Jul 15, 2020
1 parent 696771e commit a00af31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/Component/Editor.purs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import Lunarbox.Component.Modal as Modal
import Lunarbox.Component.Switch (switch)
import Lunarbox.Component.Utils (className, maybeElement, whenElem)
import Lunarbox.Config (Config, _autosaveInterval)
import Lunarbox.Control.Monad.Effect (printString)
import Lunarbox.Data.Class.GraphRep (toGraph)
import Lunarbox.Data.Dataflow.Expression.Lint as LintError
import Lunarbox.Data.Dataflow.Native.Prelude (loadPrelude)
Expand Down Expand Up @@ -314,7 +313,6 @@ component =
RemoveConnection id index -> do
modify_ $ removeConnection $ Tuple id index
void updateAll
printString $ "Removed " <> show id <> " w index " <> show index
handleAction Rerender
ChangeInputCount function amount -> do
modify_ $ set (_atInputCount function) $ Just amount
Expand Down
4 changes: 2 additions & 2 deletions src/Component/Foreign/Modal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ component =
CloseModal value -> do
id <- gets _.id
liftEffect $ closeModal id
raise $ ClosedWith value
Bubble a -> raise $ BubbledAction a

handleQuery ::
Expand All @@ -126,7 +125,8 @@ component =
{ id, onClose } <- get
void
$ fork do
void $ liftAff $ map toAff $ liftEffect $ showModal id
promise <- liftEffect $ showModal id
void $ liftAff $ toAff promise
raise $ ClosedWith onClose
pure $ Just return
Close a -> do
Expand Down

0 comments on commit a00af31

Please sign in to comment.