I have a simple widget that should set the "text" of a button from a given text input field.
While I managed to do a simple clear functionality
buttonWidget :: MonadWidget t m => m ()
buttonWidget = do
send <- button "clear"
input <- textInput $ def & setValue .~ fmap (const "") send
return ()
I did not manage to set the button label - the code below compiles
buttonWidget :: MonadWidget t m => m ()
buttonWidget = do
rec send <- button val
input <- textInput $ def & setValue .~ fmap (const "") send
val <- sample $ current $ view textInput_value input
return ()
but looking at the output index.html
- I get only a white page with a console error message:
rts.js:7313 thread blocked indefinitely in an MVar operation