on develop help sign in
Add a haddock for textInput
commitcf4ba3695438d07cdc5d7e774e481569dcabd89e authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 25 Oct 2015, 12:42 (11 years ago) parent9cfb7d9
1 file changed+1
src/Reflex/Dom/Widget/Input.hs+1
src/Reflex/Dom/Widget/Input.hs+1
@@ -49,6 +49,7 @@ instance Reflex t => Default (TextInputConfig t) where
4949 , _textInputConfig_attributes = constDyn mempty
5050 }
5151
52+-- | Create an input whose value is a string. By default, the "type" attribute is set to "text", but it can be changed using the _textInputConfig_inputType field. Note that only types for which the value is always a string will work - types whose value may be null will not work properly with this widget.
5253textInput :: MonadWidget t m => TextInputConfig t -> m (TextInput t)
5354textInput (TextInputConfig inputType initial eSetValue dAttrs) = do
5455 e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" inputType) dAttrs