Skip to content

Commit

Permalink
Deprecate dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsmith committed Jan 8, 2020
1 parent da22ab6 commit b14b7cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions reflex-dom-core/src/Reflex/Dom/Widget/Input.hs
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ regularToDropdownViewEventType en r = case en of
--TODO: We should allow the user to specify an ordering instead of relying on the ordering of the Map
-- | Create a dropdown box
-- The first argument gives the initial value of the dropdown; if it is not present in the map of options provided, it will be added with an empty string as its text
{-# DEPRECATED "Consider using 'selectElement' instead. As-is, 'dropdown' has multiple interface and implementation issues; a revised version may appear in a forthcoming high-level widget library" #-}
dropdown :: forall k t m. (DomBuilder t m, MonadFix m, MonadHold t m, PostBuild t m, Ord k) => k -> Dynamic t (Map k Text) -> DropdownConfig t k -> m (Dropdown t k)
dropdown k0 options (DropdownConfig setK attrs) = do
optionsWithAddedKeys <- fmap (zipDynWith Map.union options) $ foldDyn Map.union (k0 =: "") $ fmap (=: "") setK
Expand Down

0 comments on commit b14b7cf

Please sign in to comment.