@@ -438,12 +438,11 @@ dropdown k0 options (DropdownConfig setK attrs) = do
438438 in (Map.fromList $ map snd xs, Bimap.fromList $ map fst xs)
439439 modifyAttrs <- dynamicAttributesToModifyAttributes attrs
440440 postBuild <- getPostBuild
441− let updatedSelection = attachPromptlyDynWithMaybe (flip Bimap.lookupR) ixKeys setK
442− initialSelection = attachPromptlyDynWithMaybe (flip Bimap.lookupR) ixKeys (k0 <$ postBuild)
443− selection = leftmost [updatedSelection, initialSelection]
441+ let setSelection = attachPromptlyDynWithMaybe (flip Bimap.lookupR) ixKeys $
442+ leftmost [setK, k0 <$ postBuild]
444443 let cfg = def
445444 & selectElementConfig_elementConfig . elementConfig_modifyAttributes .~ fmap mapKeysToAttributeName modifyAttrs
446− & selectElementConfig_setValue .~ fmap (T.pack . show) selection
445+ & selectElementConfig_setValue .~ fmap (T.pack . show) setSelection
447446 (eRaw, _) <- selectElement cfg $ listWithKey indexedOptions $ \(ix, k) v -> do
448447 let optionAttrs = fmap (\dk -> "value" =: T.pack (show ix) <> if dk == k then "selected" =: "selected" else mempty) defaultKey
449448 elDynAttr "option" optionAttrs $ dynText v