on develop help sign in
Adds docs for _staticDomBuilderEnv_selectValue
commit3f9664f340d02b02ec26e738ac413e7f490034f6 authorLuigy Leon <luigy@outlook.com> dateWed 18 Jan 2017, 12:10 (10 years ago) parent4bf4ee8
1 file changed+4
src/Reflex/Dom/Builder/Static.hs+4
src/Reflex/Dom/Builder/Static.hs+4
@@ -54,6 +54,10 @@ import Reflex.TriggerEvent.Class
5454data StaticDomBuilderEnv t = StaticDomBuilderEnv
5555 { _staticDomBuilderEnv_shouldEscape :: Bool
5656 , _staticDomBuilderEnv_selectValue :: Maybe (Behavior t Text)
57+ -- ^ When the parent element is a "select" whose value has been set, this value tells us the current value.
58+ -- We use this to add a "selected" attribute to the appropriate "option" child element.
59+ -- This is not yet a perfect simulation of what the browser does, but it is much closer than doing nothing.
60+ -- TODO: Handle edge cases, e.g. setting to a value for which there is no option, then adding that option dynamically afterwards.
5761 }
5862
5963newtype StaticDomBuilderT t m a = StaticDomBuilderT