Move HasSetValue from Reflex.Dom.Widget.Input to Reflex.Dom.Builder.Class and add an instance for TextAreaElementConfig

This commit is contained in:
Alison Wu 2020-08-07 16:03:18 -04:00
parent 94c26076a7
commit b9d7914b01
2 changed files with 8 additions and 3 deletions

View File

@ -744,3 +744,11 @@ instance HasDocument m => HasDocument (DynamicWriterT t w m)
instance HasDocument m => HasDocument (PostBuildT t m)
instance HasDocument m => HasDocument (RequesterT t request response m)
instance HasDocument m => HasDocument (QueryT t q m)
class HasSetValue a where
type SetValue a :: *
setValue :: Lens' a (SetValue a)
instance Reflex t => HasSetValue (TextAreaElementConfig er t m) where
type SetValue (TextAreaElementConfig er t m) = Event t Text
setValue = textAreaElementConfig_setValue

View File

@ -626,9 +626,6 @@ instance HasAttributes (FileInputConfig t) where
type Attrs (FileInputConfig t) = Dynamic t (Map Text Text)
attributes = fileInputConfig_attributes
class HasSetValue a where
type SetValue a :: *
setValue :: Lens' a (SetValue a)
instance HasSetValue (TextAreaConfig t) where
type SetValue (TextAreaConfig t) = Event t Text