Fix the initial output value of a TextArea when its initial value is not the empty string
commit0ac1e551c036945226aad0311fd4fac64f3715b5
authorRyan Trinkle <ryan.trinkle@gmail.com>
dateMon 27 Apr 2015, 01:39 (11 years ago)
parent8b99f33
src/Reflex/Dom/Widget/Input.hs+1−1
@@ -105,7 +105,7 @@ textArea (TextAreaConfig initial eSet attrs) = do
105105 performEvent_ $ fmap (liftIO . htmlTextAreaElementSetValue e) eSet
106106 f <- holdDyn False eChangeFocus
107107 ev <- wrapDomEvent e elementOninput $ liftIO $ htmlTextAreaElementGetValue e
108− v <- holdDyn "" $ leftmost [eSet, ev]
108+ v <- holdDyn initial $ leftmost [eSet, ev]
109109 eKeypress <- wrapDomEvent e elementOnkeypress getKeyEvent
110110 return $ TextArea v e f eKeypress
111111