Closed montagy closed 8 years ago
I'm having the same problem. It looks like the Dynamic is not updated, it remains the default "Active" value.
{-# LANGUAGE OverloadedStrings #-}
import ClassyPrelude
import Data.Default (def)
import Reflex.Dom
dropdownTest :: MonadWidget t m => m ()
dropdownTest = do
val <- recordActiveWidget
dynText $ _dropdown_value val
recordActiveWidget :: MonadWidget t m => m (Dropdown t Text)
recordActiveWidget = do
let values = constDyn (("Active" =: "Active") <> ("Inactive" =: "Inactive"))
dropdown "Active" values def
I'm using the develop branch for both reflex and reflex-dom.
Hi @montagy, @mrijkeboer; thanks for reporting this. I'll look into it ASAP.
I can also reproduce using reflex-platform HEAD.
Don't know if this will be helpful but it looks like for reflex-platform this was introduced in e570691810166e476d88002950ce16c72a8dd7d2
. It does not occur for the previous commit d9eab5065319a5575456d4e472df9024987c497f
.
> git diff d9eab5065319a5575456d4e472df9024987c497f e570691810166e476d88002950ce16c72a8dd7d2 ~/src/reflex-platform
diff --git a/reflex-dom/github.json b/reflex-dom/github.json
index 44cc2fa..d4f92bc 100644
--- a/reflex-dom/github.json
+++ b/reflex-dom/github.json
@@ -1,6 +1,6 @@
{
"owner": "reflex-frp",
"repo": "reflex-dom",
- "rev": "d8cb71eb82e18a0ab316cbf108712d042f88bc3b",
- "sha256": "04djim3lkxhfrh9xb1bgpaclhjr6hjcd54msfv574pi6y80isbdi"
+ "rev": "68e10ee7e368ac42b397d6efb898be2606712b00",
+ "sha256": "0swvxbfw1qsgpm00xvkdqnb414sc8q6591gv0227gmag8cmmaig7"
}
Hey @montagy, @mrijkeboer, @mulderr:
Whoops, it looks like I used the wrong event to get the dropdown changes! Fixed, and a new reflex-platform (0e88a9c4590bf76574875c1615ae24c0ce0f4cc6) should be pushed soon with the fix.
Hey @ryantrinkle:
This change fixes the issue. Thanks.
you will always see "Red" when the submit clicked whatever the select is.